:root {
    --bg-color: #e8dcc8;
    --text-color: #744e2e;
    --header-bg: #c5b199;
    --header-text: #6b4423;
    --menu-bg: #baa48c;
    --menu-hover: #ae967c;
    --dropdown-bg: #c5b199;
    --ide-bg: #fdfbf9;
    --cli-bg: #f9f4ec;
    --code-bg: #f0e8da;
    --link-color: #7f5c3d;
    --link-hover: #8f7053;
    --shadow: rgba(0,0,0,0.18);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background: linear-gradient(rgba(232, 220, 200, 0.5), rgba(232, 220, 200, 0.95)),
                url('../images/background.png') center/cover;
    padding: 0.3em;
    text-align: center;
    border-bottom: 0.2em solid var(--menu-bg);
}

header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--header-text);
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
    margin-bottom: 15px;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 1em;
}

.menu-item {
    position: relative;
}

.menu-btn {
    background-color: var(--menu-bg);
    color: var(--header-text);
    padding: 0.2em 0.5em;
    border: none;
    border-radius: 0.3em;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    height: 100%;
}

.menu-btn:hover, .menu-btn:focus {
    background-color: var(--menu-hover);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dropdown-bg);
    border-radius: 0.2em;
    min-width: 10em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
}

.menu-item:hover .dropdown,
.menu-item:focus-within .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 0.5em 1em;
    color: var(--header-text);
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown a:hover {
    background-color: var(--menu-hover);
    border-radius: 0.2em;
}

main {
    max-width: 70em;
    margin: 0 auto;
    padding: 1.5em 1em;
}

.llm-response {
    background-color: var(--code-bg);
    padding: 0.5em 1em;
    border-radius: 0.3em;
    margin: 1em 0;
}

.content-section {
    background: rgba(255,255,255,0.6);
    padding: 1.5em;
    border-radius: 0.5em;
}

.content-section h2 {
    color: var(--link-color);
    margin-bottom: 1em;
}

.content-section h3 {
    color: var(--link-color);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.content-section h4 {
    color: var(--link-color);
    margin-top: 1em;
    margin-bottom: 0.5en;
}

.content-section p {
    margin-bottom: 15px;
}

.content-section pre {
    background-color: var(--code-bg);
    color: #e8dcc8;
    padding: 1em;
    border-radius: 0.2em;
    overflow-x: auto;
    margin: 1em 0;
    border: 1px solid #ffffff;
}

.content-section code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.content-section pre code {
    color: #000000;
}

.content-section ul, .content-section ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.content-section li {
    margin-bottom: 0.2em;
}

.content-section a {
    color: var(--link-color);
}

.content-section a:hover {
    color: var(--link-hover);
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 0.2em solid var(--menu-bg);
}

.navigation a {
    background-color: var(--menu-bg);
    color: var(--header-text);
    padding: 0.5em 1em;
    border-radius: 0.2em;
    text-decoration: none;
    transition: background-color 0.3s;
}

.navigation a:hover {
    background-color: var(--menu-hover);
}

footer {
    text-align: center;
    padding: 1em;
    background-color: var(--menu-bg);
    color: var(--header-text);
    margin-top: 2em;
}

.row {
    display: flex;
    align-items: center;
    gap: 1em;

    max-width: 80%;
    margin: 2em auto;
}

.row img {
    width: 50%;
    height: auto;
    border-radius: 1em;
}

.book_blurb {
    max-width: 90%;
    margin: 1em auto;
    overflow: auto;
}

.book_blurb img {
    float: left;
    max-height: 100%;
    max-width: 30%;
    height: auto;
    margin: 0 1em 1em 0;
}

.book_blurb::after {
    content: "";
    display: block;
    clear: both;
}

/* IMAGE CONTAINER */
.illust {
    display: block;
    width: 35%;
}

/* BASE IMAGE STYLE */
.illust img {
    width: 100%;
    height: auto;
    box-shadow: 0 6px 18px var(--shadow);
}

/* TOP LEFT IMAGE */
.left-top {
    float: left;
    margin: 0 1.2em 0.8em 0;
    shape-outside: margin-box;
}

/* RIGHT MIDDLE IMAGE */
.right-mid {
    float: right;
    margin: 0.5em 0 1em 1.2em;
    shape-outside: margin-box;
}

/* BOTTOM LEFT IMAGE */
.left-bottom {
    float: left;
    margin: 1em 1.2em 0 0;
    shape-outside: margin-box;
}

/* Optional: make text feel more “printed” */
.book-page p::first-letter {
    font-size: 1.3em;
    font-weight: bold;
}

li {
    margin-left: 2em;
}

.intro-section h2 {
    margin-bottom: 0.6em;
}

p {
    margin-bottom: 0.5em;
}

.content-section .ide,
.ide code, .content-section .ide code {
    color: #3d2b8f;
    background-color: var(--ide-bg);
}

.content-section .cli,
.cli code, .content-section .cli code {
    color: #3d2b1f;
    background-color: var(--cli-bg);
}

.cli code, .content-section .cli code {
    text-shadow: 0 3px 3px rgba(0, 130, 0, 0.2);
}

