/*
Theme Name: LLH Blog
Theme URI: https://languagelearnershub.com
Description: Minimal blog-only theme for Language Learners Hub
Author: Alex Milner
Author URI: https://languagelearnershub.com
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: llh-blog
Domain Path: /languages
*/

:root {
  --paper:#f7f9fc;
  --paper-2:#e3e6f0;
  --ink:#0f1a26;
  --blue:#255e8b;
  --blue-2:#3c8dbf;
  --blue-3:#d9ecf8;
  --orange:#e87525;
  --green:#159447;
  --rule:rgba(15,26,38,.28);
  --muted:#4a5e76;
  --serif:"Playfair Display",Georgia,serif;
  --sans:"Inter",Arial,sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

::selection {
  color: white;
  background: var(--blue);
}

/* Header */
.site-header {
  height: 76px;
  padding: 0 3vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 50;
}

.site-branding {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

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

.site-navigation {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.site-navigation ul,
.site-navigation li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-navigation a {
  padding: 30px 14px;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}

.site-navigation a:hover,
.site-navigation a.current,
.site-navigation a[aria-current="page"] {
  border-bottom-color: var(--blue);
}

.site-info{display:flex;justify-content:space-between;gap:30px;align-items:center}.site-info nav{display:flex;gap:20px}.site-info nav a{text-decoration:none;font-size:11px}

/* Main */
.site-main {
  min-height: calc(100vh - 76px);
}

/* Blog Listing / Archive */
.blog-listing {
  padding: 120px 5vw;
}

.blog-post-preview {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--rule);
}

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

.post-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}

.post-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.post-title {
  margin: 0 0 20px 0;
  font: 700 clamp(28px, 4vw, 52px) / 1 var(--serif);
  letter-spacing: -.035em;
}

.post-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color .2s;
}

.post-title a:hover {
  color: var(--blue);
}

.post-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.post-excerpt {
  margin: 0 0 20px 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.read-more {
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  margin-top: auto;
  transition: color .2s;
}

.read-more:hover {
  color: var(--ink);
}

.pagination {
  margin-top: 60px;
  padding-top: 60px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 10px 12px;
  display: inline-block;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
}

.pagination .current {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.pagination a:hover:not(.current) {
  border-color: var(--blue);
  background: var(--blue-3);
}

/* Single Post */
.blog-post-single {
  max-width: 850px;
  margin: 0 auto;
  padding: 80px 5vw;
}

.blog-post-single .post-header {
  margin-bottom: 60px;
}

.blog-post-single .post-title {
  margin: 0 0 30px 0;
  font: 700 clamp(48px, 7vw, 90px) / .88 var(--serif);
  letter-spacing: -.055em;
}

.blog-post-single .post-excerpt {
  margin: 0 0 30px 0;
  max-width: 700px;
  color: var(--muted);
  font: 500 18px / 1.6 var(--serif);
}

.blog-post-single .post-meta {
  color: var(--muted);
}

.post-featured-image {
  margin: 60px 0;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.post-content p {
  margin: 0 0 24px 0;
}

.post-content h2,
.post-content h3 {
  margin: 40px 0 20px 0;
  font: 700 clamp(28px, 4vw, 42px) / 1 var(--serif);
  letter-spacing: -.03em;
  color: var(--blue);
}

.post-content h2 {
  font-size: clamp(32px, 4.5vw, 48px);
}

.post-content ul {
  margin: 20px 0;
  padding-left: 24px;
}

.post-content li {
  margin: 12px 0;
  line-height: 1.8;
}

.post-content strong {
  font-weight: 700;
  color: var(--ink);
}

.post-content a {
  color: var(--blue);
  text-decoration: underline;
}

.post-content a:hover {
  color: var(--orange);
}

.post-tags {
  margin: 30px 0 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.post-tags a {
  padding: 6px 12px;
  border: 1px solid var(--paper-2);
  border-radius: 20px;
  text-decoration: none;
  color: var(--blue);
  transition: .2s;
}

.post-tags a:hover {
  background: var(--paper-2);
}

/* Comments */
.comments-area {
  margin: 60px 0;
  padding: 40px 0;
  border-top: 1px solid var(--paper-2);
  border-bottom: 1px solid var(--paper-2);
}

.comments-area h2 {
  margin: 0 0 30px 0;
  font: 700 28px / 1 var(--serif);
  color: var(--ink);
}

.comments-area .comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comments-area .comment {
  margin: 0 0 30px 0;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}

.comments-area .comment:first-child {
  border-top: none;
}

.comments-area .comment-author {
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--blue);
}

.comments-area .comment-text {
  margin: 12px 0 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.comments-area .comment-date {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* Comment Form */
.comment-form {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.comment-form h3 {
  margin: 0 0 30px 0;
  font: 700 22px var(--serif);
  color: var(--ink);
}

.comment-form p {
  margin: 20px 0;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  font: 500 16px / 1.4 var(--serif);
  border-bottom: 1px solid var(--rule);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-bottom-color: var(--blue);
  box-shadow: inset 0 -2px var(--blue);
}

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

.comment-form button {
  min-height: 42px;
  padding: 0 18px;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: white;
  background: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.comment-form button:hover {
  color: var(--ink);
  background: transparent;
}

/* Footer */
.site-footer {
  padding: 70px 5vw 28px;
  color: #b8c8d6;
  background: var(--ink);
  text-align: center;
  font-size: 12px;
}

.site-footer a {
  text-decoration: none;
  color: #b8c8d6;
  transition: color .2s;
}

.site-footer a:hover {
  color: white;
}

.site-info {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, .25);
  padding-top: 20px;
}

/* Pagination */
.posts-navigation {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid var(--rule);
}

.posts-navigation .nav-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.posts-navigation .page-numbers {
  padding: 12px 16px;
  display: inline-block;
  border: 1px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  transition: .2s;
}

.posts-navigation a.page-numbers:hover,
.posts-navigation .page-numbers.current {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

/* Archive Header */
.archive-header {
  max-width: 850px;
  margin: 0 auto;
  padding: 60px 5vw 40px;
}

.archive-header h1 {
  margin: 0;
  font: 700 clamp(48px, 7vw, 90px) / .88 var(--serif);
  letter-spacing: -.055em;
}

/* No Results */
.no-results {
  max-width: 850px;
  margin: 0 auto;
  padding: 60px 5vw;
  text-align: center;
}

.no-results p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

/* Improved Related Posts Cards */
.related-card {
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(15, 26, 38, 0.08);
}

.related-card:hover {
  box-shadow: 0 8px 24px rgba(15, 26, 38, 0.16);
  transform: translateY(-4px);
  border-color: var(--blue);
}

.related-excerpt {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

.related-read-more {
  padding: 10px 0;
  border-top: 1px solid var(--paper-2);
  border-bottom: 1px solid var(--paper-2);
  text-decoration: none;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  transition: color 0.2s;
  display: flex;
  justify-content: space-between;
}

.related-read-more:hover {
  color: var(--ink);
}

/* Improved CTA Buttons */
.cta-button {
  padding: 16px 28px !important;
  font-size: 13px !important;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  border: none;
}

.cta-button.tutor {
  background: white;
  color: var(--blue);
}

.cta-button.tutor:hover {
  background: var(--blue-3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 26, 38, 0.2);
}

.cta-button.speak {
  background: var(--green);
  color: white;
}

.cta-button.speak:hover {
  background: #0f7838;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(21, 148, 71, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    height: 64px;
    padding: 0 2vw;
    grid-template-columns: 1fr auto;
  }

  .site-navigation {
    display: none;
  }

  .blog-post-preview {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .blog-listing {
    padding: 60px 4vw;
  }

  .blog-post-single {
    padding: 40px 4vw;
  }

  .archive-header {
    padding: 40px 4vw 30px;
  }
}
