:root {
    --bg-color: #0f0f13;
    --text-color: #e0e0e0;
    --accent-color: #8aacc8;
    /* Muted Intellectual Blue */
    --accent-glow: rgba(138, 172, 200, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Axis Colors - Premium Palette */
    --color-truth: #4a90e2;
    /* Intellectual Blue */
    --color-empathy: #f5a623;
    /* Warm Orange */
    --color-good: #50e3c2;
    /* Moral Green */
    --color-utility: #bd10e0;
    /* Efficient Purple */
    --color-beauty: #ff5e7e;
    /* Artistic Pink */
    --color-sacred: #f8e71c;
    /* Divine Gold (muted) */
    --color-strength: #d0021b;
    /* Power Red */
    --color-humor: #7ed321;
    /* Playful Lime */
    --color-community: #8b572a;
    /* Earthy Brown */
    --color-money: #b8e986;
    /* Currency Green */
    --color-honor: #9013fe;
    /* Royal Purple */

    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Zen Kaku Gothic New', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-sans);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Page Layouts */
.page-container {
    padding-top: 80px;
    min-height: 100vh;
}

.article-header {
    text-align: center;
    padding: 4rem 5% 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.article-header h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-header .subtitle {
    color: var(--accent-color);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

.text-block {
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

.highlight-box {
    background: rgba(138, 172, 200, 0.1);
    border-left: 3px solid var(--accent-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

/* Sections */
.content-section {
    padding: 100px 5%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    /* Nav height */
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 300;
    margin: 1rem 0;
    background: linear-gradient(135deg, #fff 0%, #aaacb9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.1em;
}

.hero-content .subtitle {
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero-content .description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 2;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: #fff;
    border-radius: 50px;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Typography & Common */
.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    display: inline-block;
    padding-bottom: 0.5rem;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.section-intro {
    text-align: center;
    margin-bottom: 4rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-serif);
}

/* Introduction */
.text-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.text-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.alert-box {
    margin-top: 3rem;
    background: rgba(138, 172, 200, 0.1);
    border-left: 3px solid var(--accent-color);
    padding: 1.5rem;
    text-align: left;
    border-radius: 0 5px 5px 0;
}

.alert-box strong {
    display: block;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Axes Grid */
.axis-group {
    margin-bottom: 4rem;
}

.group-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    border-left: 2px solid var(--accent-color);
    padding-left: 1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-family: var(--font-serif);
    font-size: 1rem;
    margin-bottom: 1rem;
    min-width: 50px;
    height: 50px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card .short-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Axis Specific Glows (on hover) */
.card[data-axis="truth"]:hover {
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.2);
    border-color: var(--color-truth);
}

.card[data-axis="truth"] .card-icon {
    color: var(--color-truth);
}

.card[data-axis="empathy"]:hover {
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.2);
    border-color: var(--color-empathy);
}

.card[data-axis="empathy"] .card-icon {
    color: var(--color-empathy);
}

.card[data-axis="good"]:hover {
    box-shadow: 0 10px 30px rgba(80, 227, 194, 0.2);
    border-color: var(--color-good);
}

.card[data-axis="good"] .card-icon {
    color: var(--color-good);
}

.card[data-axis="utility"]:hover {
    box-shadow: 0 10px 30px rgba(189, 16, 224, 0.2);
    border-color: var(--color-utility);
}

.card[data-axis="utility"] .card-icon {
    color: var(--color-utility);
}

/* ... Add other axis colors similarly if needed ... */

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a20;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Theory & Cases */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
}

.theory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.full-width {
    grid-column: 1 / -1;
}

.columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.theory-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: var(--font-serif);
}

.theory-card ul,
.theory-card ol {
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.theory-card li {
    margin-bottom: 0.5rem;
}

.note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
    font-style: italic;
}

/* Case Studies */
.case-study-container {
    display: grid;
    gap: 2rem;
}

.case-card {
    display: flex;
    flex-direction: column;
}

.case-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.case-header .tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.case-header h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
}

.case-body .explanation {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 3px solid var(--text-color);
}

.explanation h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}

/* Footer */
footer {
    padding: 4rem 5%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 768px) {
    .glass-nav {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* simple structure for now */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .theory-grid,
    .columns-2 {
        grid-template-columns: 1fr;
    }
}

/* Layer Diagram Styles */
.layer-diagram {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    align-items: center;
}

.layer {
    width: 100%;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.layer:hover {
    transform: scale(1.01);
}

.layer-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
    color: #fff;
}

.layer-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.layer.meta {
    background: linear-gradient(90deg, rgba(138, 172, 200, 0.2), rgba(138, 172, 200, 0.05));
    border-left: 4px solid var(--accent-color);
}

.layer.theory {
    background: linear-gradient(90deg, rgba(80, 227, 194, 0.15), rgba(80, 227, 194, 0.05));
    border-left: 4px solid var(--color-good);
}

.layer.practice {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-left: 4px solid #fff;
}

.layer.arrow {
    text-align: center;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    background: transparent;
}

.layer.arrow:hover {
    transform: none;
}

/* Modal Styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-container.active {
    opacity: 1;
    pointer-events: all;
}

.glass-modal {
    background: rgba(20, 30, 50, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-modal:hover {
    opacity: 1;
}