/* ============================================
   Emisonian — Earth-tone single-page site
   ============================================ */

:root {
  --color-cream: #FAF6F0;
  --color-sand: #E8DCC8;
  --color-gold: #C8A96E;
  --color-warm-brown: #8B6F47;
  --color-deep-brown: #3D2B1F;
  --color-charcoal: #2C2C2C;
  --color-cool-gray: #6B7B8D;
  --color-light-gray: #F2EDE6;
  --color-white: #FFFFFF;

  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 64px;
  --container-width: 960px;
  --container-wide: 1100px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-charcoal);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-deep-brown);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-warm-brown);
  text-decoration-color: var(--color-gold);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-deep-brown);
}

/* ---- Layout ---- */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-light-gray);
}

.section-intro {
  font-size: 1.1rem;
  color: var(--color-cool-gray);
  margin-bottom: 2.5rem;
  max-width: 640px;
}

/* ---- Navigation ---- */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-cream);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#nav.scrolled {
  border-bottom-color: var(--color-sand);
  box-shadow: 0 1px 8px rgba(61, 43, 31, 0.08);
}

.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-deep-brown);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-cool-gray);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-deep-brown);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-deep-brown);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- Hero ---- */

.hero {
  position: relative;
  height: 70vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('images/hero-mountains.jpg') center/cover no-repeat;
  margin-top: var(--nav-height);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(61, 43, 31, 0.45) 0%,
    rgba(61, 43, 31, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

/* ---- About ---- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.about-text p:first-child {
  font-size: 1.15rem;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(61, 43, 31, 0.12);
}

/* ---- Book ---- */

.book-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.book-cover img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(61, 43, 31, 0.15);
}

.book-text h3 {
  font-size: 1.5rem;
  color: var(--color-deep-brown);
}

.book-meta {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-cool-gray);
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  margin-right: 0.75rem;
  margin-top: 0.5rem;
  transition: background 0.2s, color 0.2s;
  background: var(--color-warm-brown);
  color: var(--color-white);
}

.btn:hover {
  background: var(--color-deep-brown);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-warm-brown);
  border: 1.5px solid var(--color-warm-brown);
}

.btn-outline:hover {
  background: var(--color-warm-brown);
  color: var(--color-white);
}

/* ---- Cards ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.card {
  background: var(--color-white);
  border-radius: 6px;
  padding: 1.75rem;
  border: 1px solid var(--color-sand);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(61, 43, 31, 0.1);
  transform: translateY(-2px);
}

.card h3 a {
  text-decoration: none;
  color: var(--color-deep-brown);
}

.card h3 a:hover {
  color: var(--color-warm-brown);
}

.card-role {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-cool-gray);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card p:last-child {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ---- Photo Break ---- */

.photo-break {
  height: 40vh;
  min-height: 250px;
  background: url('images/canyon.jpg') center/cover no-repeat;
  position: relative;
}

.photo-break-2 {
  background-image: url('images/overlook.png');
}

.photo-break-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 246, 240, 0.1) 0%,
    rgba(250, 246, 240, 0.05) 50%,
    rgba(250, 246, 240, 0.1) 100%
  );
}

/* ---- Article Lists ---- */

.writing-source {
  font-size: 1rem;
  color: var(--color-warm-brown);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-sand);
}

.writing-source:first-of-type {
  margin-top: 0;
}

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

.article-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-sand);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

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

.article-list a {
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
}

.article-list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-underline-offset: 3px;
}

.article-date {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-cool-gray);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Contact ---- */

.contact-container {
  text-align: center;
  max-width: 600px;
}

.contact-email {
  margin-top: 1.5rem;
}

.contact-email a {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-warm-brown);
  text-decoration: none;
  border-bottom: 2px solid var(--color-gold);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.contact-email a:hover {
  color: var(--color-deep-brown);
  border-color: var(--color-deep-brown);
}

/* ---- Footer ---- */

.footer {
  background: var(--color-deep-brown);
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-cream);
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--color-sand);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.5rem 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero {
    height: 50vh;
    min-height: 300px;
  }

  .section {
    padding: 3.5rem 0;
  }

  h2 {
    font-size: 1.6rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .book-grid {
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
  }

  .card-grid-2 {
    grid-template-columns: 1fr;
  }

  .article-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .photo-break {
    height: 30vh;
    min-height: 180px;
  }
}

/* ---- Legal Pages ---- */

.legal-page {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 4rem;
  min-height: 70vh;
}

.legal-page h1 {
  font-family: var(--font-sans);
  font-size: 2rem;
  color: var(--color-deep-brown);
  margin-bottom: 0.5rem;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-updated {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-cool-gray);
  margin-bottom: 2rem;
}

.legal-page p {
  font-size: 0.95rem;
  max-width: 680px;
}

@media (max-width: 480px) {
  .book-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-cover {
    max-width: 160px;
    margin: 0 auto;
  }

  .container {
    padding: 0 1.25rem;
  }
}
