:root {
    --bg: #ffffff;
    --soft: #f8f9fc;
    --soft-accent: #f1f0ff;
    --text: #111827;
    --sub: #5f6b7a;
    --muted: #8b94a3;
    --accent: #4f46e5;
    --accent-hover: #3730a3;
    --border: #e5e7eb;
    --shadow: 0 12px 34px rgba(17, 24, 39, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    line-height: 1.8;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid rgba(79, 70, 229, 0.34); outline-offset: 4px; }

.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}
.logo { font: 700 1.4rem 'Inter', sans-serif; text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; list-style: none; }
.nav-links a { color: var(--sub); font-size: 0.94rem; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

.container { width: min(1120px, calc(100% - 4rem)); margin: 0 auto; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; color: var(--muted); font-size: 0.82rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.topic-hero {
    padding: 4.8rem 0 4rem;
    background:
        radial-gradient(circle at 82% 8%, rgba(79, 70, 229, 0.13), transparent 28%),
        linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
    border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); gap: 3rem; align-items: center; }
.eyebrow, .section-label { color: var(--accent); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow { display: inline-flex; margin-bottom: 1rem; padding: 0.36rem 0.8rem; border: 1px solid rgba(79, 70, 229, 0.2); border-radius: 999px; background: rgba(79, 70, 229, 0.07); }
h1 { max-width: 760px; font-size: clamp(2.15rem, 5vw, 3.75rem); line-height: 1.18; letter-spacing: -0.05em; }
.hero-lead { max-width: 760px; margin-top: 1.35rem; color: var(--sub); font-size: 1.05rem; }
.hero-note { padding: 1.6rem; border: 1px solid rgba(79, 70, 229, 0.18); border-radius: 22px; background: rgba(255, 255, 255, 0.88); box-shadow: var(--shadow); }
.hero-note strong { display: block; margin-bottom: 0.65rem; font-size: 1.05rem; }
.hero-note p { color: var(--sub); font-size: 0.92rem; }

.section { padding: 4.5rem 0; }
.section.alt { background: var(--soft); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-label { display: block; margin-bottom: 0.6rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.35; letter-spacing: -0.04em; }
.section-intro { margin-top: 0.8rem; color: var(--sub); }

.learning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.learning-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.learning-number { display: grid; width: 2rem; height: 2rem; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--soft-accent); color: var(--accent); font: 700 0.82rem 'Inter', sans-serif; }
.learning-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; line-height: 1.5; }
.learning-card p { color: var(--sub); font-size: 0.91rem; }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.article-card { display: flex; min-height: 100%; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: #fff; color: var(--text); text-decoration: none; box-shadow: 0 5px 18px rgba(17, 24, 39, 0.04); transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.article-card:hover { transform: translateY(-3px); border-color: rgba(79, 70, 229, 0.34); box-shadow: var(--shadow); }
.article-image { overflow: hidden; aspect-ratio: 16 / 9; background: #eceef3; }
.article-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.article-card:hover img { transform: scale(1.035); }
.article-body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; color: var(--muted); font-size: 0.76rem; }
.article-category { color: var(--accent); font-weight: 700; }
.article-card h3 { font-size: 1.08rem; line-height: 1.55; }
.article-card p { margin-top: 0.7rem; color: var(--sub); font-size: 0.9rem; }
.article-link { margin-top: auto; padding-top: 1rem; color: var(--accent); font-size: 0.88rem; font-weight: 700; }

.reading-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; counter-reset: path; }
.path-step { position: relative; padding: 1.4rem 1.4rem 1.4rem 4rem; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.path-step::before { counter-increment: path; content: counter(path); position: absolute; top: 1.35rem; left: 1.25rem; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.path-step h3 { font-size: 1rem; }
.path-step p { margin-top: 0.4rem; color: var(--sub); font-size: 0.88rem; }

.topic-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.topic-link { display: flex; min-height: 8.5rem; flex-direction: column; justify-content: space-between; padding: 1.2rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; text-decoration: none; transition: border-color 0.18s ease, transform 0.18s ease; }
.topic-link:hover { transform: translateY(-2px); border-color: rgba(79, 70, 229, 0.34); }
.topic-link small { color: var(--accent); font-weight: 700; }
.topic-link strong { line-height: 1.5; }
.topic-link span { color: var(--accent); }

.cta { padding: 3rem; border: 1px solid rgba(79, 70, 229, 0.18); border-radius: 26px; background: linear-gradient(135deg, #f4f3ff 0%, #fff 70%); }
.cta p { max-width: 720px; margin-top: 0.8rem; color: var(--sub); }
.cta-link { display: inline-flex; margin-top: 1.4rem; padding: 0.78rem 1.15rem; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.cta-link:hover { background: var(--accent-hover); }

.site-footer { padding: 3rem 0 4rem; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; color: var(--muted); font-size: 0.88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; }
.footer-links a { color: var(--sub); text-decoration: none; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-note { max-width: 620px; }
    .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .learning-grid, .reading-path { grid-template-columns: 1fr; }
    .topic-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .site-nav { padding: 1rem 1.25rem; }
    .nav-links { display: none; }
    .container { width: min(100% - 2.5rem, 1120px); }
    .topic-hero { padding: 3.5rem 0 3rem; }
    h1 { font-size: clamp(2rem, 11vw, 2.75rem); }
    .section { padding: 3.5rem 0; }
    .article-grid, .topic-links { grid-template-columns: 1fr; }
    .topic-link { min-height: 7rem; }
    .cta { padding: 2rem 1.4rem; }
    .footer-inner { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
