@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
    --parchment:      #FCF8E8;
    --ink:            #1a1612;
    --ink-light:      #4a3f35;
    --terra:          #DF7861;
    --terra-dark:     #c45f48;
    --sidebar-bg:     #1a1612;
    --max-width:      680px;
    --banner-h:       70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--parchment);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    color: var(--ink);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.75;
    padding-top: var(--banner-h);
}

p { text-indent: 2em; margin-bottom: 1.25rem; color: var(--ink-light); }

/* Banner */
.banner {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--banner-h);
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    background-color: var(--parchment);
    border-bottom: 1px solid var(--terra);
}

.banner h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
}

.banner h1 a { color: var(--ink); text-decoration: none; border-bottom: none; transition: color 0.3s; }
.banner h1 a:hover { color: var(--terra); border-bottom: none; }

.menu {
    margin-left: auto;
    font-size: 1.5rem;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.3s;
    padding: 0.25rem 0.5rem;
    user-select: none;
}
.menu:hover { color: var(--terra); }

/* Sidebar */
.sideBar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 12;
    top: 0; right: 0;
    background-color: var(--sidebar-bg);
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 4rem;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 2px solid var(--terra);
}

.sideBar a {
    display: block;
    padding: 0.45rem 3rem 0.45rem 2rem;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--parchment);
    text-decoration: none;
    border-bottom: none;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s, padding-left 0.2s;
}

.sideBar a:hover {
    opacity: 1;
    color: var(--terra);
    padding-left: 2.5rem;
    border-bottom: none;
    cursor: pointer;
}

.sideBar hr {
    border: none;
    border-top: 1px solid rgba(223,120,97,0.25);
    margin: 0.5rem 2rem;
}

.sideBar .close {
    position: absolute;
    top: 0.75rem; right: 1.25rem;
    font-size: 2rem;
    color: var(--parchment);
    opacity: 0.6;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    line-height: 1;
    border-bottom: none;
}
.sideBar .close:hover { opacity: 1; color: var(--terra); padding-left: 0.5rem; border-bottom: none; }

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11;
    background: rgba(26,22,18,0.4);
    backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

/* Content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
    animation: fadeUp 0.5s ease both;
}

h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
    color: var(--ink);
    border-bottom: 1px solid var(--terra);
    padding-bottom: 0.5rem;
}

h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    margin: 2rem 0 0.75rem;
    color: var(--ink);
}

ol { padding-left: 1.5rem; }
ol li { margin-bottom: 0.6rem; line-height: 1.6; }
ol ol { margin-top: 0.4rem; margin-bottom: 0.4rem; }

a {
    color: var(--terra-dark);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}
a:hover { color: var(--terra); border-bottom-color: var(--terra); cursor: pointer; }

hr { border: none; border-top: 1px solid var(--terra); margin: 2rem 0; opacity: 0.4; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .banner h1 { font-size: 1.1rem; }
    main { padding: 2rem 1.25rem 4rem; }
}
