/*
Theme Name: MyChess Rust
Theme URI: https://mychess.blog/
Author: MyChess.blog
Description: Clean modern WordPress theme for MyChess.blog — chess blog with Rust-lang inspired aesthetics (original branding, not a copy).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mychess-rust
*/

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #0c0c0c;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #f74c00; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: #0c0c0c; margin: 0 0 0.75rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }

.wrap {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 0;
}
.site-branding a {
  color: #0c0c0c;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-branding a:hover { color: #f74c00; text-decoration: none; }
.site-branding .custom-logo-link img { max-height: 40px; width: auto; }

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.primary-nav a {
  color: #0c0c0c;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: #f74c00;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 1rem;
  color: #0c0c0c;
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: #444;
  max-width: 36rem;
  margin: 0 auto 2rem;
}
.btn {
  display: inline-block;
  background: #f74c00;
  color: #fff !important;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: #d94200; }
.btn-outline {
  background: transparent;
  color: #f74c00 !important;
  border: 2px solid #f74c00;
}
.btn-outline:hover { background: #fff5f0; }

/* Features */
.features {
  background: #f5f5f5;
  padding: 3.5rem 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
}
.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: #444;
  margin: 0;
  font-size: 0.98rem;
}
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: #fff5f0;
  color: #f74c00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Content */
.site-main { padding: 3rem 0 4rem; }
.page-header { margin-bottom: 2rem; }
.entry { max-width: 720px; }
.entry-title { font-size: 2rem; margin-bottom: 0.5rem; }
.entry-meta { color: #666; font-size: 0.9rem; margin-bottom: 1.5rem; }
.posts-list { list-style: none; padding: 0; margin: 0; }
.posts-list li {
  border-bottom: 1px solid #eee;
  padding: 1.5rem 0;
}
.posts-list h2 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.posts-list h2 a { color: #0c0c0c; text-decoration: none; }
.posts-list h2 a:hover { color: #f74c00; }
.posts-list .excerpt { color: #444; margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid #eee;
  background: #f5f5f5;
  padding: 2rem 0;
  font-size: 0.9rem;
  color: #555;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.site-footer a { color: #0c0c0c; }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    width: 100%;
  }
  .primary-nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .primary-nav ul {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0 0.75rem;
  }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 2.5rem; }
}
