/* Full-width navigation container - absolutely positioned */
.nav-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: rgb(224, 212, 241);
  padding: 0.5rem 0;
  z-index: 10;
}

/* Add top padding to body to account for fixed nav */
body {
  padding-top: 5rem;
}

/* Navigation styling */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

nav a {
  text-decoration: none;
  color: #7f1d1d; /* darker red for contrast */
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: lowercase;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
  nav {
    padding: 0 0.5rem;
  }

  nav a {
    font-size: 1rem;
    padding: 0.5rem 0.5rem;
  }
}

nav a:hover {
  text-decoration: underline;
}

nav a.active {
  font-weight: 800;
}

/* Blog list styling */
.blog-year {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}
.blog-post-item {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .blog-post-item {
    line-height: 1.5;
  }
}

.blog-date {
  width: 5rem;
  flex-shrink: 0;
  color: #666;
  font-size: 1.2rem;
}

.blog-title {
  text-decoration: none;
  color: inherit;
  font-size: 1.4rem;
}

.blog-title:hover {
  text-decoration: underline;
}

.blog-arrow {
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 1.2rem;
}

.blog-post-item:hover .blog-arrow {
  opacity: 1;
}

/* Contact page styling */
.contact-links {
  margin-top: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
}

.contact-link:hover {
  opacity: 0.8;
}

.contact-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

/* Guestbook styling */
.guestbook-header {
  margin-bottom: 2.5rem;
}

.guestbook-header h1 {
  margin-bottom: 1rem;
}

.guestbook-header button {
  margin-bottom: 1.5rem;
}

.guestbook-entry {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 55%; /* Match Tufte paragraph width */
}

.guestbook-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.guestbook-message {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.guestbook-name {
  font-style: italic;
  color: #555;
  font-size: 1rem;
}

/* Button styling */
button {
  background: #333;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: background-color 0.2s;
}

button:hover {
  background: #555;
}

/* Modal styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  max-width: 32rem;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  color: #666;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-actions button {
  flex: 1;
}

.button-secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.button-secondary:hover {
  background: #e9e9e9;
}

/* Empty state styling */
.text-center {
  text-align: center;
}

.text-muted {
  color: #666;
  font-style: italic;
}

.py-2 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Mobile responsive guestbook */
@media (max-width: 768px) {
  .guestbook-header {
    flex-direction: column;
    align-items: stretch;
  }

  .guestbook-entry {
    max-width: 100%;
  }

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}
