/*
Theme Name: NamesMeaning
Theme URI: https://namesmeaning.blog/
Author: Seth Kelly
Author URI: https://namesmeaning.blog/
Description: Dark letter playground theme for NamesMeaning. Latest Posts first, five name categories, category archives, full article pages, Seth Kelly author box.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: namesmeaning
Tags: blog, dark, names, slang, fantasy, responsive
*/

:root {
  --ink: #16130f;
  --ink-2: #1e1a15;
  --surface: #221e19;
  --surface-2: #2b261f;
  --line: #3a332a;
  --text: #f4efe8;
  --muted: #b3a99b;
  --muted-2: #8d8378;
  --violet: #8b5cf6;
  --fuchsia: #d946ef;
  --amber: #f59e0b;
  --grad: linear-gradient(135deg, #8b5cf6, #d946ef 52%, #f59e0b);
  --radius: 16px;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--amber); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 12px; }
p { margin: 0 0 16px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 10px;
}
.section { padding: 56px 0 8px; }
.section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.section-sub { color: var(--muted); margin: 0 0 28px; max-width: 640px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(22, 19, 15, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.site-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.logo-tiles { display: inline-flex; gap: 3px; }
.logo-tiles span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; font-size: 14px; font-weight: 800;
  color: #fff; background: var(--grad);
}
.logo-tiles span:nth-child(2) { transform: rotate(-4deg); }
.logo-tiles span:nth-child(4) { transform: rotate(3deg); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--text); background: var(--surface); }
.header-search { display: flex; align-items: center; }
.header-search input[type="search"] {
  width: 150px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 14px; outline: none;
}
.header-search input[type="search"]:focus { border-color: var(--violet); width: 190px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.hero-inner { position: relative; z-index: 2; max-width: 660px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.hero p.lede { font-size: 18px; color: var(--muted); margin-bottom: 24px; max-width: 560px; }
.hero-tiles { position: absolute; top: 0; right: 0; width: 400px; height: 100%; pointer-events: none; z-index: 1; }
.hero-tiles span {
  position: absolute; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; color: #fff;
  border-radius: 12px; background: var(--grad); opacity: .92;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.hero-tiles span:nth-child(1) { width: 74px; height: 74px; font-size: 34px; top: 22px; right: 250px; transform: rotate(-8deg); }
.hero-tiles span:nth-child(2) { width: 58px; height: 58px; font-size: 26px; top: 96px; right: 150px; transform: rotate(6deg); }
.hero-tiles span:nth-child(3) { width: 88px; height: 88px; font-size: 40px; top: 40px; right: 40px; transform: rotate(4deg); }
.hero-tiles span:nth-child(4) { width: 52px; height: 52px; font-size: 24px; top: 168px; right: 260px; transform: rotate(-5deg); }
.hero-tiles span:nth-child(5) { width: 64px; height: 64px; font-size: 28px; top: 180px; right: 60px; transform: rotate(-3deg); }
.hero-search { display: flex; gap: 10px; max-width: 520px; }
.hero-search input[type="search"] {
  flex: 1; padding: 13px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 15px; outline: none;
}
.hero-search input[type="search"]:focus { border-color: var(--violet); }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 15px; font-family: var(--font-body);
}
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { color: var(--amber); }

/* Post cards */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--violet); transform: translateY(-3px); }
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.cat-pill {
  display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--grad); margin-bottom: 10px;
}
.post-card h3 { font-size: 19px; margin-bottom: 8px; }
.post-card h3 a:hover { color: var(--amber); }
.post-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; flex: 1; }
.meta { font-size: 13px; color: var(--muted-2); display: flex; gap: 12px; flex-wrap: wrap; }

/* Category cards */
.cats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; display: flex; flex-direction: column; min-height: 250px;
}
.cat-card:hover { border-color: var(--fuchsia); }
.cat-card h3 { font-size: 20px; margin-bottom: 4px; }
.cat-card .count { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.cat-card ul { list-style: none; margin: 0 0 14px; padding: 0; flex: 1; }
.cat-card li { margin-bottom: 9px; font-size: 14.5px; line-height: 1.4; }
.cat-card li a { color: var(--text); }
.cat-card li a:hover { color: var(--amber); }
.cat-card li time { display: block; font-size: 12px; color: var(--muted-2); }
.cat-card .more { font-size: 14px; font-weight: 700; color: var(--amber); }

/* A-Z */
.az-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.az-strip a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.az-strip a:hover { background: var(--grad); color: #fff; border-color: transparent; }

/* Breadcrumbs */
.crumbs { font-size: 13.5px; color: var(--muted-2); margin: 28px 0 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--amber); }
.crumbs .sep { margin: 0 8px; color: var(--muted-2); }

/* Article */
.article { max-width: 780px; margin: 0 auto; padding-bottom: 40px; }
.article h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: -.015em; }
.article .lede { font-size: 19px; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 12px; margin: 18px 0 24px; color: var(--muted); font-size: 14.5px; }
.byline .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.byline strong { color: var(--text); }
.featured { border-radius: var(--radius); overflow: hidden; margin: 0 0 28px; border: 1px solid var(--line); }
.featured img { width: 100%; }
.article-content h2 { font-size: 26px; margin: 36px 0 12px; }
.article-content h3 { font-size: 21px; margin: 28px 0 10px; }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 24px; }
.article-content li { margin-bottom: 7px; }
.article-content table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.article-content caption { caption-side: top; text-align: left; font-weight: 700; padding: 8px 0; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.article-content th { background: var(--surface); font-family: var(--font-display); }
.article-content blockquote { border-left: 4px solid var(--fuchsia); margin: 0 0 18px; padding: 12px 18px; background: var(--surface); border-radius: 0 12px 12px 0; }
.quick-answer { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 12px; padding: 18px 20px; margin: 0 0 24px; }
.quick-answer strong { font-family: var(--font-display); }

/* Author box */
.author-box {
  display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin: 40px 0;
}
.author-box .avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.author-box h3 { font-size: 20px; margin-bottom: 6px; }
.author-box p { color: var(--muted); font-size: 15px; margin: 0; }

/* Archive */
.archive-head { padding: 48px 0 8px; }
.archive-head h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; }
.archive-head p { color: var(--muted); max-width: 640px; }
.archive-list { display: grid; gap: 16px; margin: 28px 0 40px; }
.archive-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; gap: 18px; align-items: flex-start; }
.archive-item:hover { border-color: var(--violet); }
.archive-item .thumb { flex: 0 0 180px; border-radius: 10px; overflow: hidden; }
.archive-item .thumb img { width: 100%; height: 110px; object-fit: cover; }
.archive-item h2 { font-size: 21px; margin-bottom: 6px; }
.archive-item p { color: var(--muted); font-size: 14.5px; margin-bottom: 10px; }
.pagination { display: flex; gap: 8px; margin: 0 0 48px; }
.pagination a, .pagination span { padding: 9px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; }
.pagination .current { background: var(--grad); color: #fff; border-color: transparent; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 48px 0 28px; background: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: 14.5px; }
.site-footer li a { color: var(--muted); }
.site-footer li a:hover { color: var(--amber); }
.site-footer p { color: var(--muted); font-size: 14.5px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; font-size: 13.5px; color: var(--muted-2); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Search / 404 */
.search-head, .notfound { padding: 56px 0; text-align: center; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal;
}
.notfound h1 { font-size: 72px; }
.center { text-align: center; }
.mt-24 { margin-top: 24px; }

/* Responsive */
@media (max-width: 960px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-tiles { opacity: .35; }
  .main-nav { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .posts-grid, .cats-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .hero { padding: 44px 0 36px; }
  .hero-tiles { display: none; }
  .author-box { flex-direction: column; }
  .archive-item { flex-direction: column; }
  .archive-item .thumb { flex-basis: auto; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
