@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600&family=Sanchez&display=swap');

:root {
  --color-bg: #faf9f7;
  --color-text: #2d2d2d;
  --color-heading: #444;
  --color-accent: #666469;
  --color-link: #4dadcd;
  --color-link-hover: #3a8faa;
  --color-header-bg: #302e32;
  --color-header-text: #fff;
  --color-footer-bg: #28262a;
  --color-footer-text: #c2c2c2;
  --color-border: #e5e3e0;
  --font-body: 'Figtree', "Helvetica Neue", Helvetica, sans-serif;
  --font-heading: 'Sanchez', serif;
  --max-width: 960px;
}

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

body {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==============================
   Header / Masthead
   ============================== */

#masthead {
  background-color: var(--color-header-bg);
  padding-top: 24px;
}

.site-branding {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 20px;
  text-align: center;
}

.site-title-link {
  text-decoration: none;
  color: var(--color-header-text);
  display: block;
}

.site-title-link:hover {
  text-decoration: none;
  color: var(--color-header-text);
}

.site-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6em, 4vw, 2.2em);
  font-weight: 400;
  color: var(--color-header-text);
  margin: 0;
  letter-spacing: 0.02em;
}

.site-description {
  margin: 4px 0 24px;
  color: #b8b6bc;
  font-size: clamp(0.9em, 2vw, 1.1em);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* ==============================
   Navigation
   ============================== */

.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px 16px;
  text-align: center;
}

nav ul.menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

nav ul.menu li {
  margin: 0;
}

nav ul.menu a {
  font-family: var(--font-heading);
  font-size: 0.85em;
  text-decoration: none;
  color: var(--color-header-text);
  padding: 6px 14px;
  border-radius: 20px;
  display: block;
  transition: background 0.25s ease;
}

nav ul.menu a:hover {
  background: var(--color-link);
  color: var(--color-header-text);
  text-decoration: none;
}

/* ==============================
   Tab nav for inner pages
   ============================== */

body.inner nav {
  padding-bottom: 0;
}

body.inner nav ul.menu {
  align-items: flex-end;
  gap: 0;
}

body.inner nav ul.menu a {
  border-radius: 8px 8px 0 0;
  margin: 0 2px;
  padding-bottom: 10px;
}

body.inner nav ul.menu a:not(.active) {
  margin-bottom: 6px;
}

body.inner nav ul.menu a:not(.active):hover {
  background: rgba(255, 255, 255, 0.12);
}

body.inner nav ul.menu a.active,
body.inner nav ul.menu a.active:hover {
  font-size: clamp(0.825em, 1.9vw, 1.01em);
  background: var(--color-bg);
  color: var(--color-heading);
  padding: 10px 28px 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==============================
   Homepage Hero
   ============================== */

body.home nav ul.menu a.active {
  background: var(--color-link);
  color: var(--color-header-text);
}

body.home #masthead {
  background-image: url('images/nell-scovell-1800.jpg');
  background-size: cover;
  background-position: 25% center;
  background-repeat: no-repeat;
  min-height: 340px;
  position: relative;
}

body.home #masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(48, 46, 50, 0.2) 0%,
    transparent 35%,
    transparent 55%,
    rgba(48, 46, 50, 0.45) 100%
  );
  pointer-events: none;
}

body.home .site-branding,
body.home nav {
  position: relative;
  z-index: 1;
}

body.home .site-branding {
  padding-top: 48px;
}

body.home .site-title {
  font-size: clamp(2em, 5vw, 2.8em);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

body.home .site-description {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

body.home nav ul.menu a {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

body.home main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
  min-height: 40vh;
}

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

body.home .about-layout {
  animation: fadeUp 0.6s ease both;
}

/* ==============================
   Content area
   ============================== */

#content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 0;
}

.content-row {
  display: flex;
  gap: 40px;
}

#primary {
  flex: 1;
  min-width: 0;
}

/* ==============================
   Blog posts
   ============================== */

article.post {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

article.post:last-child {
  border-bottom: none;
}

article.post .entry-meta-aside {
  margin-bottom: 10px;
}

article.post .entry-meta-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

article.post .entry-meta-aside .posted-on time {
  font-size: 0.85em;
  color: var(--color-accent);
}

.entry-header {
  margin-bottom: 10px;
}

.entry-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.4em;
  line-height: 1.3;
  color: var(--color-heading);
  margin: 0 0 16px;
}

.entry-title a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color 0.2s ease;
}

.entry-title a:hover {
  color: var(--color-link);
}

.entry-content figure {
  margin: 0 0 15px;
}

.entry-content p {
  margin-bottom: 1em;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

/* ==============================
   Pagination
   ============================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 20px 0;
  margin-top: 10px;
}

.page-numbers {
  display: flex;
  gap: 6px;
}

.page-numbers a,
.page-numbers .page-current {
  display: inline-block;
  min-width: 28px;
  padding: 4px 8px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.9em;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-numbers .page-current {
  background: var(--color-link);
  color: var(--color-header-text);
}

.page-numbers a {
  color: var(--color-link);
  text-decoration: none;
}

.page-numbers a:hover {
  background: var(--color-link);
  color: var(--color-header-text);
  text-decoration: none;
}

.page-prev,
.page-next {
  font-family: var(--font-heading);
  font-size: 0.85em;
  color: var(--color-link);
  text-decoration: none;
}

.page-prev:hover,
.page-next:hover {
  text-decoration: underline;
}

/* ==============================
   Sidebar
   ============================== */

#secondary {
  width: 260px;
  flex-shrink: 0;
}

#secondary .widget {
  margin-bottom: 25px;
}

#secondary .widget h2 {
  font-family: var(--font-heading);
  font-size: 1em;
  font-weight: 400;
  margin: 0 0 10px;
  line-height: 1.4;
}

#secondary .widget h3.widget-title {
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: 400;
  color: var(--color-heading);
  margin: 0 0 8px;
}

#secondary .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#secondary .widget ul li {
  padding: 3px 0;
  font-size: 0.9em;
  color: var(--color-accent);
}

#secondary .widget p {
  font-size: 0.9em;
  margin-bottom: 1em;
}

/* ==============================
   Footer
   ============================== */

footer#colophon {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: 48px;
  padding: 28px 20px 64px;
  text-align: center;
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

footer#colophon a {
  color: var(--color-footer-text);
  transition: color 0.2s ease;
}

footer#colophon a:hover {
  color: #eee;
}

/* ==============================
   Single post page
   ============================== */

.single-post .entry-header time {
  font-size: 0.85em;
  color: var(--color-accent);
}

.single-post .entry-title {
  margin-top: 8px;
}

.single-post .entry-content {
  margin-top: 20px;
}

.single-post .entry-content img {
  max-width: 100%;
  height: auto;
}

.single-post .entry-content figure {
  margin: 0 0 15px;
}

/* ==============================
   Inner pages (non-home)
   ============================== */

body.inner main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
  min-height: 50vh;
}

body.inner main h2:first-child {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 27px);
  font-weight: 400;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0;
  margin-bottom: 24px;
}

body.inner main h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
}

body.inner main p + p {
  margin-top: 1em;
}

/* ==============================
   Page-specific: About (homepage)
   ============================== */

.about-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.about-photo {
  width: 280px;
  flex-shrink: 0;
  border-radius: 6px;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1em;
}

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

/* ==============================
   Page-specific: Hero (homepage alt)
   ============================== */

.hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.hero-book {
  width: 180px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-text {
  flex: 1;
}

/* ==============================
   Page-specific: Book feature
   ============================== */

.book-feature {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.book-cover-large {
  width: 200px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

.book-subtitle {
  font-style: italic;
  color: var(--color-accent);
}

.button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-size: 0.85em;
  text-decoration: none;
  color: var(--color-header-text);
  background: var(--color-link);
  border: none;
  border-radius: 20px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--color-link-hover);
  color: var(--color-header-text);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ==============================
   Page-specific: Book list
   ============================== */

.book-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.book-entry {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.book-cover {
  width: 100px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

.book-date {
  font-size: 0.9em;
  color: var(--color-accent);
}

/* ==============================
   Page-specific: On The Web
   ============================== */

.otw-intro {
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.avatar-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  float: left;
  margin-right: 1rem;
}

/* ==============================
   Page-specific: Article list
   ============================== */

.article-list {
  list-style: none;
}

.article-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-pub {
  font-family: var(--font-heading);
  font-size: 0.85em;
  color: var(--color-accent);
}

.article-list time {
  font-size: 0.85em;
  color: var(--color-accent);
}

/* ==============================
   Page-specific: Praise
   ============================== */

.praise-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 540px;
  margin: 0 auto;
}

.praise-list blockquote {
  margin: 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--color-link);
}

.praise-list blockquote p {
  font-size: 1.05em;
  line-height: 1.5;
}

.praise-list cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85em;
  font-style: normal;
  color: var(--color-accent);
}

/* ==============================
   Page-specific: Events
   ============================== */

.event-list {
  list-style: none;
}

.event-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.event-list li:last-child {
  border-bottom: none;
}

/* ==============================
   Page-specific: Contact
   ============================== */

.contact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-list section {
  margin-bottom: 0.5rem;
}

.contact-list h3 {
  font-family: var(--font-heading);
  font-size: 0.85em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* ==============================
   Responsive
   ============================== */

@media (max-width: 768px) {
  .content-row {
    flex-direction: column;
  }

  #secondary {
    width: 100%;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    margin: 10px auto 0;
    width: 28px;
    height: 20px;
    position: relative;
  }

  .hamburger span,
  .hamburger span::before,
  .hamburger span::after {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--color-header-text);
    transition: transform 0.3s;
  }

  .hamburger span {
    top: 9px;
  }

  .hamburger span::before {
    content: "";
    top: -7px;
  }

  .hamburger span::after {
    content: "";
    top: 7px;
  }

  .menu-toggle:checked ~ .hamburger span {
    background: transparent;
  }

  .menu-toggle:checked ~ .hamburger span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-toggle:checked ~ .hamburger span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  nav {
    display: none;
    padding: 0 15px 15px;
  }

  .menu-toggle:checked ~ nav {
    display: block;
  }

  nav ul.menu {
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    align-items: stretch;
  }

  body.inner nav {
    padding-bottom: 15px;
  }

  body.inner nav ul.menu a {
    border-radius: 20px;
    margin: 0;
  }

  body.inner nav ul.menu a:not(.active) {
    margin-bottom: 0;
  }

  body.inner nav ul.menu a.active,
  body.inner nav ul.menu a.active:hover {
    font-size: 0.85em;
    background: var(--color-link);
    color: var(--color-header-text);
    padding: 6px 14px;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 20px;
  }

  body.home #masthead {
    min-height: 220px;
    background-position: 20% center;
  }

  body.home .site-branding {
    padding-top: 32px;
  }

  .about-layout {
    flex-direction: column;
    align-items: center;
  }

  .about-photo {
    width: 200px;
  }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-book {
    width: 140px;
  }

  .book-feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .book-cover-large {
    width: 160px;
  }

  .book-list {
    grid-template-columns: 1fr;
  }

  .book-entry {
    gap: 1rem;
  }

  .book-cover {
    width: 70px;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }
}
