/* ================================
   Root theme variables
================================ */
:root {
  --bg: #0b0f16;
  --panel: #101725;
  --panel-2: #0f1623;
  --ink: #e5e7eb;
  --muted: #99a1b3;
  --brand: #f59e0b;
  --brand-2: #f8af2e;
  --accent: #7dd3fc;
  --shadow: rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg), #0a1321);
}

/* ================================
   Links
================================ */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================================
   Layout
================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
}

/* ================================
   Header
================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 22, 0.7);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #334155, #0ea5e9);
}

.titles h1 {
  margin: 0;
  font-size: 1.2rem;
}
.subtitle {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a {
  margin-left: 16px;
  color: var(--ink);
  opacity: 0.9;
}
.nav a:hover {
  opacity: 1;
}

/* ================================
   Hero
================================ */
.hero {
  background:
    radial-gradient(80% 60% at 10% 10%, rgba(125, 211, 252, 0.15), transparent 50%),
    radial-gradient(90% 70% at 90% 20%, rgba(245, 158, 11, 0.15), transparent 50%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 28px;
  min-height: 48vh;
}

.hero-copy h2 {
  margin: 0.1em 0 0.4em;
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
}

.hero-copy p {
  max-width: 56ch;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
}
.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px var(--shadow);
}
.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ================================
   Sections
================================ */
.section {
  padding: 56px 0;
}
.section.alt {
  background: var(--panel-2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 28px;
}

.about-panel {
  padding: 16px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  margin: 10px 0;
  padding-left: 28px;
}
.ticks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #86efac;
}

.author-photo {
  width: 140px;
  float: left;
  margin: 0 16px 12px 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.book-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: center;
}

.book-cover img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  padding: 14px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}
.card img {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.card .meta {
  margin: 0.3rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ================================
   Footer
================================ */
.site-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer nav a {
  margin-right: 12px;
}
.site-footer p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}
.small {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ================================
   Floating Sigils
================================ */
.sigil-floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 64px;
  opacity: 0.7;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  z-index: 60;
}

.sword-talisman {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 80px;
  opacity: 0.8;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  z-index: 60;
}

/* ================================
   Responsive
================================ */
@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .nav {
    display: none;
  }
  .two-col,
  .book-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .author-photo {
    float: none;
    display: block;
    margin: 0 auto 12px;
    max-width: 200px;
  }
  .sigil-floating {
    right: 12px;
    bottom: 12px;
    width: 52px;
  }
  .sword-talisman {
    left: 12px;
    bottom: 12px;
    width: 60px;
  }
}

/* ================================
   Accessibility
================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
