/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  color: #111;
  background: #fff;
}

/* ---- Layout ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 190px;
  height: 100vh;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
}

main {
  margin-left: 190px;
  max-width: 680px;
  padding: 48px 56px;
}

/* ---- Navigation ---- */
.site-name {
  font-weight: 600;
  color: #111;
  text-decoration: none;
  display: block;
  margin-bottom: 28px;
}

.site-name:hover {
  color: #555;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

nav ul a {
  color: #111;
  text-decoration: none;
}

nav ul a:hover {
  color: #555;
}

nav ul a.active {
  color: #888;
}

/* ---- Sections ---- */
section {
  padding: 32px 0;
}

section:first-child {
  padding-top: 0;
}

/* ---- About ---- */
#about-photo {
  display: block;
  width: 360px;
  height: 360px;
  object-fit: cover;
  margin-top: 32px;
}

#about p {
  color: #333;
  margin-bottom: 12px;
}

#about p:last-child {
  margin-bottom: 0;
}

#about a {
  color: #111;
  text-underline-offset: 3px;
}

/* ---- Section headings ---- */
h2 {
  font-weight: 600;
  color: #111;
  margin-bottom: 32px;
}

/* ---- Subsection headings ---- */
.subsection-heading {
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 0;
}

.subsection-heading:first-child {
  margin-top: 0;
}

/* ---- Writing ---- */
.article-list {
  list-style: none;
}

.article-list li {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.article-list a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.4;
}

.no-link {
  color: #111;
  line-height: 1.4;
}

.subtitle {
  color: #555;
  line-height: 1.4;
}

.meta {
  color: #888;
  margin-top: 2px;
}

/* ---- Book ---- */
.book-block {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.book-text h3 {
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.book-meta {
  color: #888;
  margin-bottom: 16px;
}

.book-text p {
  color: #333;
  margin-bottom: 20px;
}

.book-text a {
  color: inherit;
}

.book-blurb {
  font-style: italic;
  margin-bottom: 36px;
}

.book-blurb-attribution {
  font-style: normal;
}

.preorder-btn {
  display: inline-block;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #111;
  padding-bottom: 1px;
}

.preorder-btn:hover {
  color: #555;
  border-color: #555;
}

/* ---- Hamburger button (hidden on desktop) ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #111;
  padding: 0;
  line-height: 1;
}

/* ---- Mobile ---- */
@media (max-width: 700px) {
  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 20px 24px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    z-index: 100;
  }

  .site-name {
    margin-bottom: 0;
  }

  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    background: #fff;
    padding: 16px 24px 28px;
    border-bottom: 1px solid #e8e8e8;
  }

  nav.open ul {
    display: flex;
  }

  main {
    margin-left: 0;
    margin-top: 60px;
    padding: 28px 24px;
  }
}
