*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:Georgia,'Times New Roman',serif;background:#f8f6f2;color:#222;min-height:100vh;display:flex;flex-direction:column}
a{color:#851010;text-decoration:none}
a:hover{text-decoration:underline}
code{font-family:'Courier New',monospace;background:#f0ece4;padding:2px 6px;border-radius:3px;font-size:.88em}

/* NAVBAR */
.navbar{background:linear-gradient(135deg,#6b0e0e 0%,#851010 60%,#9e3010 100%);box-shadow:0 2px 8px rgba(0,0,0,.3);position:sticky;top:0;z-index:100}
.nav-inner{max-width:1100px;margin:0 auto;padding:0 2rem;display:flex;align-items:center;justify-content:space-between;height:58px}
.nav-brand{color:#f5e6c8;font-size:1.18rem;font-weight:bold;text-decoration:none}
.nav-brand:hover{color:#fff;text-decoration:none}
.nav-knight{font-size:1.25rem;margin-right:5px;vertical-align:middle}
.nav-links{list-style:none;display:flex;gap:1.8rem}
.nav-links a{color:#f5e6c8;font-size:.95rem;font-family:Arial,sans-serif;letter-spacing:.04em;text-decoration:none;padding-bottom:3px;border-bottom:2px solid transparent;transition:color .2s,border-color .2s}
.nav-links a:hover,.nav-links a.active{color:#fff;border-bottom-color:#C8820F;text-decoration:none}

/* HERO */
.hero{background:linear-gradient(135deg,#6b0e0e 0%,#851010 55%,#9e3010 100%);padding:3.5rem 2rem;text-align:center}
.hero-inner{max-width:800px;margin:0 auto}
.hero h1{font-size:2.5rem;color:#fff;line-height:1.25;margin-bottom:.6rem}
.hero-subtitle{font-size:1.1rem;color:#f0d8a8;font-style:italic}

/* MAIN */
.content{max-width:1100px;margin:0 auto;padding:2.5rem 2rem 3rem;flex:1}

/* BOOKS SECTION */
.books-section{display:flex;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 3px 18px rgba(0,0,0,.10);overflow:hidden;margin-bottom:2.5rem}
.book-card{flex:1;display:flex;flex-direction:row;gap:1.8rem;padding:2.2rem 2rem;align-items:flex-start}
.book-card:first-child{border-right:1px solid #e8e0d0}
.book-divider{display:none}
.book-cover-wrap img{width:190px;height:auto;border-radius:4px;box-shadow:0 4px 18px rgba(0,0,0,.22);display:block}
.book-info{flex:1;display:flex;flex-direction:column;gap:.3rem}
.book-info h2{font-size:1.1rem;color:#2a1a0a;line-height:1.4}
.book-subtitle{font-size:.9rem;color:#666;font-style:italic}
.book-author{font-size:.88rem;color:#888;margin-bottom:.5rem}
.book-purchase{margin-top:auto;padding-top:1rem}
.purchase-label{display:block;font-size:.82rem;font-family:Arial,sans-serif;color:#999;text-transform:uppercase;letter-spacing:.07em;margin-bottom:.6rem}
.purchase-buttons{display:flex;gap:.7rem;flex-wrap:wrap;align-items:center}
.btn-springer{display:inline-flex;align-items:center;gap:6px;background:#fff;color:#333;border:2px solid #C8820F;border-radius:4px;padding:.4rem .9rem;font-family:Arial,sans-serif;font-size:.85rem;font-weight:bold;text-decoration:none;transition:background .18s,color .18s}
.btn-springer:hover{background:#C8820F;color:#fff;text-decoration:none}
.springer-knight{font-size:1rem}
.btn-amazon{display:inline-flex;align-items:center;gap:4px;background:#131921;color:#fff;border:2px solid #131921;border-radius:4px;padding:.4rem .9rem;font-family:Arial,sans-serif;font-size:.85rem;font-weight:bold;text-decoration:none;flex-direction:column;line-height:1;transition:background .18s}
.btn-amazon:hover{background:#232f3e;text-decoration:none;color:#fff}

/* DESCRIPTION + FEATURES */
.description{margin-bottom:2.5rem}
.description p{font-size:1rem;line-height:1.75;color:#444}
.features h2{font-size:1.5rem;color:#851010;margin-bottom:1.2rem;border-bottom:2px solid #C8820F;padding-bottom:.4rem}
.feature-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1.2rem}
.feature-card{background:#fff;border:1px solid #e0d8c8;border-top:3px solid #851010;border-radius:4px;padding:1.2rem 1.3rem;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.feature-card h3{font-size:.98rem;color:#851010;margin-bottom:.5rem;font-family:Arial,sans-serif}
.feature-card p{font-size:.88rem;color:#555;line-height:1.65}

/* INNER PAGES */
.page-content{max-width:980px;margin:2.5rem auto 3rem;padding:0 2rem;flex:1}
.page-title{font-size:2rem;color:#851010;border-bottom:2px solid #C8820F;padding-bottom:.5rem;margin-bottom:1.5rem}

/* AUTHOR PAGE */
.author-wrap{display:flex;gap:2.5rem;align-items:flex-start;flex-wrap:wrap;background:#fff;border:1px solid #ddd;border-radius:8px;padding:2.2rem 2rem;box-shadow:0 3px 14px rgba(0,0,0,.08)}
.author-photo-col{display:flex;flex-direction:column;align-items:center;flex-shrink:0;gap:.9rem}
.author-photo{width:210px;border-radius:10px;box-shadow:0 4px 18px rgba(0,0,0,.18);display:block}
.author-links-below{display:flex;flex-direction:column;align-items:center;gap:.55rem;width:210px}
.author-link-item{display:flex;align-items:center;gap:6px;font-family:Arial,sans-serif;font-size:.88rem;color:#1a56c4;text-decoration:underline;text-underline-offset:2px}
.author-link-item:hover{color:#851010}
.link-icon{font-size:1rem;text-decoration:none}
.author-bio{flex:1;min-width:260px}
.author-bio h2{font-size:1.6rem;color:#2a1a0a;margin-bottom:.2rem}
.author-title{font-size:.95rem;color:#851010;font-style:italic;margin-bottom:1.3rem;line-height:1.5}
.author-bio p{font-size:.97rem;line-height:1.78;color:#333;margin-bottom:1rem}

/* EDITION HEADERS */
.edition-header{border-radius:6px 6px 0 0;padding:.9rem 1.4rem;display:flex;align-items:center;gap:.9rem;flex-wrap:wrap;margin-top:2rem}
.python-header{background:linear-gradient(135deg,#1a4a8a,#2a6fc0);color:#fff}
.r-header{background:linear-gradient(135deg,#6b0e0e,#851010);color:#fff}
.edition-header h3{font-size:1.05rem;color:#fff;margin:0}
.edition-tag{background:rgba(255,255,255,.22);border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:20px;padding:2px 11px;font-size:.75rem;font-family:Arial,sans-serif;font-weight:bold;letter-spacing:.06em;text-transform:uppercase}

/* DATA PAGE */
.data-block{background:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 6px 6px;padding:1rem 1.5rem 1.4rem;margin-bottom:1rem}
.data-chapter{padding:.7rem 0;border-bottom:1px solid #f0ece4}
.data-chapter:last-child{border-bottom:none}
.data-chapter h4{font-size:.9rem;font-family:Arial,sans-serif;font-weight:bold;color:#444;margin-bottom:.4rem}
.data-chapter ul{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:.3rem 1.5rem}
.data-chapter ul li{font-size:.87rem;color:#555}
.data-chapter ul li a{color:#851010;font-weight:bold;font-family:'Courier New',monospace}
.data-chapter ul li a:hover{text-decoration:underline}

/* TOPICS PAGE */
.topics-block{background:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 6px 6px;padding:1.2rem 1.5rem;margin-bottom:.5rem}
.topics-cols{display:grid;grid-template-columns:1fr 1fr;gap:2rem}
.topics-col h4{font-size:.88rem;font-family:Arial,sans-serif;text-transform:uppercase;letter-spacing:.06em;color:#851010;border-bottom:1px solid #e0d0b0;padding-bottom:.3rem;margin-bottom:.7rem}
.topics-col.py-col h4{color:#1a4a8a}
.topics-col ul{list-style:none;padding:0}
.topics-col ul li{font-size:.9rem;color:#333;padding:.22rem 0;border-bottom:1px solid #f5f0e8;line-height:1.45}
.topics-col ul li::before{content:'›';color:#C8820F;font-weight:bold;margin-right:6px}

/* RAVIX PAGE */
.ravix-hero{text-align:center;background:linear-gradient(135deg,#0d2a5c 0%,#1a4a8a 60%,#2a6fc0 100%);border-radius:8px;padding:2.5rem 1.5rem 2rem;margin-bottom:2rem}
.ravix-logo-large{max-width:500px;width:88%;height:auto;background:#fff;padding:14px 24px;border-radius:6px;box-shadow:0 4px 18px rgba(0,0,0,.3);display:block;margin:0 auto 1.2rem}
.ravix-tagline{color:#c8d8f0;font-style:italic;font-size:1.05rem;margin-bottom:1.5rem}
.ravix-links{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}
.btn-ravix{background:#fff;color:#1a4a8a;font-family:Arial,sans-serif;font-weight:bold;font-size:.95rem;padding:.55rem 1.3rem;border-radius:4px;border:2px solid #fff;text-decoration:none;transition:background .18s,color .18s}
.btn-ravix:hover{background:#1a4a8a;color:#fff;text-decoration:none}
.btn-github{background:#24292e;color:#fff;font-family:Arial,sans-serif;font-weight:bold;font-size:.95rem;padding:.55rem 1.3rem;border-radius:4px;border:2px solid #24292e;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:background .18s}
.btn-github:hover{background:#444d56;text-decoration:none;color:#fff}
.ravix-section{background:#fff;border:1px solid #ddd;border-radius:8px;padding:1.8rem 2rem;margin-bottom:1.5rem;box-shadow:0 2px 10px rgba(0,0,0,.06)}
.ravix-section h2{font-size:1.3rem;color:#1a4a8a;border-bottom:2px solid #c8d8f0;padding-bottom:.4rem;margin-bottom:1rem}
.ravix-section p{font-size:.97rem;line-height:1.75;color:#333;margin-bottom:.8rem}
.ravix-section a{color:#1a4a8a}
.functions-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:1rem}
.fn-card{background:#f5f8fd;border:1px solid #c8d8f0;border-radius:6px;padding:.9rem 1rem}
.fn-name{font-family:'Courier New',monospace;font-weight:bold;font-size:1rem;color:#1a4a8a;margin-bottom:.35rem}
.fn-desc{font-size:.84rem;color:#444;line-height:1.5;margin-bottom:.4rem}
.fn-card code{display:block;background:#e4eaf8;border-radius:3px;padding:3px 7px;font-size:.82rem;font-family:'Courier New',monospace;color:#0d2a5c}

/* FOOTER */
.footer{background:#2a1a0a;color:#b09070;text-align:center;padding:1.1rem;font-size:.83rem;font-family:Arial,sans-serif}

/* RESPONSIVE */
@media(max-width:800px){
  .books-section{flex-direction:column}
  .book-card:first-child{border-right:none;border-bottom:1px solid #e8e0d0}
  .book-card{flex-direction:column;align-items:center;text-align:center}
  .book-cover-wrap img{width:160px}
  .purchase-buttons{justify-content:center}
  .hero h1{font-size:1.8rem}
  .topics-cols{grid-template-columns:1fr}
  .author-wrap{flex-direction:column;align-items:center}
  .nav-links{gap:1rem}
}
