/* ============================================================
   Corpus2Skill Navigator - Site Styles
   明るいアカデミック × ナレッジグラフ
   Palette: paper #faf8f2 / indigo #312e81 / emerald #059669
   ============================================================ */

:root {
  --paper: #faf8f2;
  --paper-2: #f3efe4;
  --paper-3: #ece7d8;
  --ink: #26263a;
  --muted: #63637a;
  --indigo-950: #1e1b4b;
  --indigo-900: #312e81;
  --indigo-700: #4338ca;
  --indigo-200: #c7d2fe;
  --indigo-100: #e0e7ff;
  --indigo-50: #eef2ff;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --line: #ddd6c4;
  --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --shadow-sm: 0 1px 3px rgba(30, 27, 75, 0.08);
  --shadow-md: 0 4px 16px rgba(30, 27, 75, 0.12);
  --shadow-lg: 0 12px 32px rgba(30, 27, 75, 0.18);
  --radius: 10px;
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(67, 56, 202, 0.045) 0, transparent 28rem),
    radial-gradient(circle at 88% 92%, rgba(5, 150, 105, 0.05) 0, transparent 28rem);
  line-height: 1.9;
  font-size: 16px;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--indigo-700);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--emerald-600);
}

ul, ol {
  padding-left: 1.4em;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--indigo-900);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--indigo-900);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.14em;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.2rem 0.4rem;
  align-items: center;
  flex-wrap: wrap;           /* 2行レイアウト対応 */
  max-width: 900px;          /* ナビゲーション全体の最大幅制限 */
  justify-content: center;   /* メニュー項目を中央配置 */
  padding-left: 0;
}

.nav-item a {
  display: inline-block;
  font-weight: 500;
  color: var(--ink);
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.88rem;
  white-space: nowrap;
}

.nav-item a:hover {
  background: var(--indigo-100);
  color: var(--indigo-900);
}

.nav-item a.active {
  background: var(--indigo-900);
  color: #fff;
}

.nav-item a.nav-blog {
  border: 1.5px solid var(--emerald-600);
  color: var(--emerald-700);
}

.nav-item a.nav-blog:hover {
  background: var(--emerald-600);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--indigo-900);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--indigo-900);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.28) 0%, rgba(30, 27, 75, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 1.2rem;
  max-width: 900px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 2.7rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75), 0 4px 22px rgba(0, 0, 0, 0.6);
  -webkit-text-stroke: 1px rgba(30, 27, 75, 0.5);
  paint-order: stroke fill;
}

.hero .hero-lead {
  margin-top: 1.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0fdf4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 3px 14px rgba(0, 0, 0, 0.65);
}

.hero .hero-tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 1.1rem;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Page hero (smaller) */
.page-hero {
  min-height: 300px;
}

.page-hero h1 {
  font-size: 2.1rem;
}

/* ---------------- Layout ---------------- */

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.4rem;
  padding: 2.6rem 0 4rem;
}

/* ---------------- Article ---------------- */

.article-content {
  min-width: 0;
}

.article-content .lead-paragraph {
  font-size: 1.05rem;
  border-left: 4px solid var(--emerald-600);
  background: var(--emerald-50);
  padding: 1rem 1.3rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2.2rem;
}

.article-content h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--indigo-900);
  margin: 3rem 0 1.2rem;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 6px solid var(--indigo-900);
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}

.article-content h2::before {
  content: "◈ ";
  color: var(--emerald-600);
  font-size: 0.9em;
}

.article-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--indigo-950);
  margin: 2rem 0 0.9rem;
  padding-left: 0.85rem;
  position: relative;
}

.article-content h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald-600);
  box-shadow: 0 0 0 3px var(--emerald-100);
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.4rem 0.4rem;
}

.article-content li {
  margin-bottom: 0.45rem;
}

.article-content strong {
  color: var(--indigo-900);
  background: linear-gradient(transparent 68%, var(--emerald-100) 68%);
}

/* Figure / SVG */
.figure-block {
  margin: 2rem 0;
  padding: 1.4rem 1.2rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.figure-block svg {
  max-width: 100%;
  height: auto;
}

.figure-block figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Code */
.code-block {
  background: var(--indigo-950);
  color: #e0e7ff;
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0 1.8rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.75;
  box-shadow: var(--shadow-md);
}

.code-block code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  white-space: pre;
}

code.inline-code {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 0.86em;
  background: var(--indigo-50);
  color: var(--indigo-900);
  border: 1px solid var(--indigo-100);
  border-radius: 5px;
  padding: 0.1em 0.45em;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 2rem;
  font-size: 0.92rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th {
  background: var(--indigo-900);
  color: #fff;
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-weight: 600;
}

.data-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--paper-3);
  vertical-align: top;
}

.data-table tr:nth-child(even) td {
  background: var(--paper-2);
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

/* Info boxes */
.note-box {
  background: var(--indigo-50);
  border: 1px solid var(--indigo-200);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.note-box .note-title {
  font-weight: 700;
  color: var(--indigo-900);
  display: block;
  margin-bottom: 0.4rem;
}

.point-box {
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  border-left: 5px solid var(--emerald-600);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.point-box .note-title {
  font-weight: 700;
  color: var(--emerald-800);
  display: block;
  margin-bottom: 0.4rem;
}

/* In-article ads */
.ad-inline {
  margin: 1.6rem 0;
  padding: 0.8rem;
  text-align: center;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ad-inline img {
  max-width: 100%;
  height: auto;
}

.amazon-banner {
  margin: 1.4rem 0;
}

.amazon-banner a {
  display: block;
  background: linear-gradient(90deg, var(--indigo-50), var(--emerald-50));
  border: 1px solid var(--indigo-200);
  border-radius: var(--radius);
  padding: 0.75rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--indigo-900);
  text-align: center;
}

.amazon-banner a:hover {
  box-shadow: var(--shadow-md);
  color: var(--emerald-700);
}

/* Prev / Next pager */
.page-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.page-pager a {
  flex: 1;
  max-width: 48%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo-900);
  box-shadow: var(--shadow-sm);
}

.page-pager a:hover {
  border-color: var(--emerald-600);
  box-shadow: var(--shadow-md);
}

.page-pager .pager-next {
  text-align: right;
  margin-left: auto;
}

.page-pager .pager-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  min-width: 0;
}

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget .widget-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--indigo-900);
  padding-bottom: 0.5rem;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid var(--emerald-600);
}

.sidebar-ad {
  text-align: center;
  overflow: hidden;
}

.sidebar-ad img {
  max-width: 100%;
  height: auto;
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-list li {
  border-bottom: 1px dashed var(--paper-3);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: block;
  padding: 0.5rem 0.2rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.toc-list a::before {
  content: "▸ ";
  color: var(--emerald-600);
}

.toc-list a:hover {
  color: var(--indigo-700);
  padding-left: 0.5rem;
}

.related-list {
  list-style: none;
  padding-left: 0;
}

.related-list li {
  margin-bottom: 0.55rem;
}

.related-list a {
  display: block;
  font-size: 0.88rem;
  padding: 0.55rem 0.8rem;
  background: var(--paper-2);
  border-radius: 8px;
  color: var(--indigo-900);
  border-left: 3px solid var(--indigo-700);
}

.related-list a:hover {
  background: var(--indigo-100);
  border-left-color: var(--emerald-600);
}

/* ---------------- Home sections ---------------- */

.section {
  padding: 3.4rem 0;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--indigo-900);
  text-align: center;
  margin-bottom: 0.7rem;
}

.section-title-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  margin-bottom: 2.4rem;
  text-transform: uppercase;
}

.section-title-sub::before,
.section-title-sub::after {
  content: "—";
  color: var(--emerald-600);
  margin: 0 0.7rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.4rem;
  align-items: center;
}

.intro-text p {
  margin-bottom: 1.2rem;
}

.intro-figure {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
}

/* News */
.news-section {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.news-list {
  list-style: none;
  padding-left: 0;
  max-width: 860px;
  margin: 0 auto;
}

.news-list li {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.3rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.news-date {
  font-family: var(--serif);
  color: var(--emerald-700);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.news-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--indigo-700);
  border-radius: 4px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}

.news-body {
  flex: 1;
  min-width: 220px;
  font-size: 0.95rem;
}

/* Page cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.6rem;
}

.page-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.page-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.page-card .card-thumb {
  height: 150px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.page-card .card-no {
  position: absolute;
  left: 0.8rem;
  bottom: -14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--indigo-900);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--paper);
  font-size: 0.95rem;
}

.page-card .card-body {
  padding: 1.4rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.page-card h3 {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--indigo-900);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.page-card p {
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: 0.9rem;
}

.card-link {
  align-self: flex-start;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--emerald-700);
}

.card-link::after {
  content: " →";
}

/* CTA band */
.cta-band {
  background: var(--indigo-900);
  background-image: radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.35) 0, transparent 22rem);
  color: #fff;
  text-align: center;
  padding: 3rem 1.2rem;
}

.cta-band h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.cta-band p {
  color: var(--indigo-100);
  max-width: 720px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}

.cta-button {
  display: inline-block;
  background: var(--emerald-600);
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 2.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  background: var(--emerald-700);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--indigo-950);
  color: var(--indigo-100);
  padding: 3rem 0 1.5rem;
  margin-top: 0;
  border-top: 5px solid var(--emerald-600);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.7rem;
}

.footer-desc {
  font-size: 0.84rem;
  color: var(--indigo-200);
  line-height: 1.8;
}

.footer-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(199, 210, 254, 0.3);
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--indigo-200);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: var(--indigo-200);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(199, 210, 254, 0.2);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

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

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

  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 3px solid var(--indigo-900);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem 1rem 1rem;
    max-width: none;
    gap: 0;
  }

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

  .nav-item a {
    display: block;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--paper-3);
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 380px;
  }

  .hero h1 {
    font-size: 1.55rem;
  }

  .hero .hero-lead {
    font-size: 0.98rem;
  }

  .page-hero {
    min-height: 260px;
  }

  .page-hero h1 {
    font-size: 1.45rem;
  }

  .article-content h2 {
    font-size: 1.28rem;
  }

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

  .page-pager {
    flex-direction: column;
  }

  .page-pager a {
    max-width: 100%;
  }

  .news-list li {
    gap: 0.6rem;
  }
}
