/* Writer Website - Minimal Literary Aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@300;400;500&family=Radley:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --background: #F2F0EF;
  --accent: #2a2a2a;
  --border: #e0e0e0;
  --max-width: 800px;
}

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

body {
  font-family: 'Radley', 'Georgia', 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--background);
  padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.6;
}

/* Header and Navigation */
header {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.site-title a {
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.95rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

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

/* Social Icon */
.social-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 60vh;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  margin-top: 0;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

/* Home Page Sections */
.home-section {
  margin-bottom: 5rem;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

#home-about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

/* Featured Fiction on Home */
.featured-fiction-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .featured-fiction-card {
    grid-template-columns: 200px 1fr;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
}

/* Footer */
footer {
  max-width: var(--max-width);
  margin: 6rem auto 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Blog Post List */
.post-list {
  list-style: none;
}

.post-item {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

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

.post-date {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 1.8rem;
  margin: 0.5rem 0 1rem;
}

.post-title a {
  text-decoration: none;
}

.post-title a:hover {
  opacity: 0.6;
}

.post-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.read-more {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
}

/* Individual Post */
.post-header {
  margin-bottom: 3rem;
}

/* Reading Time (for stories) */
.reading-time {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Story Links */
.story-links {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.story-links a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.story-links a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
  opacity: 1;
}

.post-content {
  margin-bottom: 4rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
}

.post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content code {
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.post-content pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 3px;
  margin: 2rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Footnotes */
.footnotes {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footnotes ol {
  padding-left: 2rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}

.footnote-ref a,
.footnote-backref {
  text-decoration: none;
  font-size: 0.85em;
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  align-items: start;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.2s;
  min-height: 80px;
}

.post-nav-link:hover {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.02);
  opacity: 1;
}

.post-nav-prev {
  text-align: left;
}

.post-nav-next {
  text-align: right;
  grid-column: 3;
}

.post-nav-label {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post-nav-title {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.post-nav-random {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  min-height: 80px;
}

.post-nav-random:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--background);
}

.post-nav-random .post-nav-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .post-nav-next {
    grid-column: 1;
  }
  
  .post-nav-random {
    order: 3;
  }
}

/* Fiction/Books Grid */
.fiction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.fiction-item {
  text-align: center;
}

.fiction-cover {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fiction-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.fiction-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* About Page */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.about-photo {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 300px 1fr;
    gap: 4rem;
  }
  
  .about-photo {
    margin: 0;
  }
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin-top: 2rem;
}

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

.form-group label {
  display: block;
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: 'Radley', 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--background);
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

button[type="submit"] {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--background);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}

button[type="submit"]:hover {
  opacity: 0.8;
}

/* Comments Section */
.comments-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border);
}

.comments-section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.comments-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  margin-top: 3rem;
}

/* Comments List */
#comments-list {
  margin-bottom: 3rem;
}

.comments-count {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.no-comments {
  color: var(--text-secondary);
  font-style: italic;
  padding: 2rem 0;
}

.comment {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comment-author,
.comment-author-link {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.comment-author-link {
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.comment-author-link:hover {
  border-bottom-color: var(--text-primary);
  opacity: 1;
}

.comment-date {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.comment-body {
  line-height: 1.7;
  color: var(--text-primary);
}

/* Comment Form */
.comment-form-wrapper {
  margin-top: 3rem;
}

.comment-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.comment-form .form-group {
  margin-bottom: 1.5rem;
}

.comment-form label {
  display: block;
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: none;
  font-weight: 300;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: 'Radley', 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--background);
  transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.comment-form button[type="submit"] {
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--background);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}

.comment-form button[type="submit"]:hover {
  opacity: 0.8;
}

/* Form Status Messages */
.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 3px;
  font-size: 0.95rem;
}

.form-status.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-status.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.form-status.info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Error State */
.error {
  padding: 2rem;
  background: #fff5f5;
  border: 1px solid #ffcccc;
  border-radius: 3px;
  color: #cc0000;
  margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 17px;
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  nav ul {
    gap: 1.5rem;
  }
  
  .fiction-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2rem;
  }
}

/* Blog Post Metadata (Category and Tags) */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: var(--background);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.75rem;
  border-radius: 3px;
}

.post-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.75rem;
  border-radius: 3px;
}

/* Fiction Tags */
.fiction-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.fiction-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.75rem;
  border-radius: 3px;
}

/* Fiction Links */
.fiction-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.fiction-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--accent);
  text-decoration: none;
  text-align: center;
  font-family: 'Lexend Deca', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.85rem;
  border-radius: 3px;
  transition: all 0.2s;
}

.fiction-link:hover {
  background: var(--accent);
  color: var(--background);
  opacity: 1;
}

@media (max-width: 768px) {
  .post-meta {
    font-size: 0.8rem;
  }
  
  .fiction-links {
    gap: 0.4rem;
  }
  
  .fiction-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}
