:root {
    /* Ice & Steel Palette */
    --bg-main: #f0f9ff;     /* Sky 50 - Very light page background */
    --bg-sidebar: #e0f2fe;  /* Sky 100 - Distinct sidebar */
    --text-primary: #334155; /* Slate 700 - High contrast text */
    --text-muted: #64748b;   /* Slate 500 - Secondary text */
    --accent: #0284c7;       /* Sky 600 - Links and highlights */
    --border: #bae6fd;       /* Sky 200 - Subtle borders */
    --card-bg: rgba(255, 255, 255, 0.6); /* Glassy card background */
    
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    height: 100vh;
    overflow: hidden; /* Prevent body scroll */
}

a { 
    text-decoration: none; 
    color: inherit;
    transition: color 0.2s;
}

/* Layout Container */
.book-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px;
    flex-shrink: 0;
    overflow-y: auto;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    display: block;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-top: 4px;
}

.highlight { color: var(--text-muted); }

/* Sidebar Navigation */
.book-nav {
    margin-top: 60px;
    flex-grow: 1;
}

.book-nav ul {
    list-style: none;
}

.book-nav li {
    margin-bottom: 20px;
}

.book-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 0;
    border-right: 3px solid transparent;
    cursor: pointer;
}

.book-nav a:hover {
    color: var(--accent);
}

.book-nav a.active {
    color: var(--text-primary);
    border-right-color: var(--accent);
    font-weight: 600;
}

.nav-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--border); /* Subtle number */
    width: 20px;
}

.book-nav a.active .nav-number {
    color: var(--accent);
}

/* Sidebar Footer & Lang */
.lang-switcher {
    margin-top: 40px;
    order: -1; 
    margin-bottom: 20px;
}

.current-lang {
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.lang-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.lang-options button {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.lang-options button:hover, .lang-options button.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.sidebar-footer {
    display: flex;
    gap: 20px;
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.sidebar-footer a {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.sidebar-footer a:hover { color: var(--accent); }


/* Main Content Area - Presentation Mode */
.content-area {
    flex-grow: 1;
    padding: 60px 8%;
    height: 100vh;
    overflow-y: auto; /* Allow scrolling WITHIN the slide if needed */
    position: relative;
    background-color: var(--bg-main);
}

/* Presentation / Tab Logic */
.chapter {
    display: none; /* Hide by default */
    animation: fadeEffect 0.5s; /* Fade in animation */
    /* Grid Layout for Split Screen */
    display: none; 
}

.chapter.active {
    display: grid; /* Active becomes grid */
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center; /* Vertically center */
    height: 100%;
}

@keyframes fadeEffect {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}

.slide-content {
    padding-right: 20px;
}

.slide-visual {
    height: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-visual img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

/* Specific Adjustments for Intro Slide */
#overview.chapter.active {
    grid-template-columns: 1.2fr 0.8fr; /* More text space for intro */
}

/* Responsive: Stack on small screens */
@media (max-width: 1100px) {
    .chapter.active {
        display: flex;
        flex-direction: column;
    }
    .slide-visual {
        max-height: 300px;
        width: 100%;
        margin-top: 20px;
    }
    .content-area {
        overflow-y: auto;
    }
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    display: inline-block;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 50px;
}

.text-block {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.intro-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Components: Callout Box */
.callout-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 12px;
    display: flex;
    gap: 60px;
    margin: 40px 0;
    box-shadow: 0 4px 15px -1px rgba(0,0,0,0.05);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 2.2rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 5px;
}

.stat span {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Components: Service Block */
.service-block {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.4);
    border-left: 4px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s;
}

.service-block:hover {
    border-left-color: var(--accent);
    background: white;
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.service-block h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* Components: Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for slide robustness */
    gap: 25px;
}

.tech-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.2s;
}

.tech-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.tech-name {
    display: block;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* Components: Strategy List */
.strategy-row {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
}

.strategy-row i {
    background: var(--bg-sidebar);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.strategy-row strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.location-list-simple {
    list-style: none;
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.location-list-simple li {
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border);
    text-align: center;
    font-weight: 500;
}
