/*
Theme Name: Andrew Baker 2026
Theme URI: https://andrewbaker.ninja
Author: Andrew Baker
Description: Custom theme for andrewbaker.ninja — CIO, AWS Architect & Banking Technologist.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: andrew-baker-2026
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #111111;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── NAV ── */
nav.site-nav {
  background: #111;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 1rem; }
.nav-logo { color: #fff; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.02em; }
.nav-logo span { color: #e8ff00; }
.nav-sponsor {
  display: inline-flex;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.nav-sponsor span { color: #e8ff00; }
.nav-sponsor:hover { border-color: #e8ff00; color: #fff; }
@media (max-width: 700px) { .nav-sponsor { display: none; } }

/* Primary nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li {
  position: relative;
}
.nav-menu > li > a {
  display: block;
  color: #aaa;
  font-size: 1rem;
  font-weight: 600;
  padding: 0 0.9rem;
  height: 56px;
  line-height: 56px;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-menu > li > a:hover,
.nav-menu > li:hover > a { color: #fff; }

/* Dropdown */
.nav-menu .sub-menu,
.nav-menu .sub-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  min-width: 220px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-top: 2px solid #e8ff00;
  border-radius: 0 0 6px 6px;
  list-style: none;
  padding: 0.4rem 0;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-menu li:hover > .sub-menu { display: block; }
/* Flip last 3 items' dropdowns to align right so they don't overflow */
.nav-menu > li:nth-last-child(-n+3) > .sub-menu {
  left: auto;
  right: 0;
}
.nav-menu .sub-menu li a {
  display: block;
  color: #bbb;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
  transition: color 0.1s, background 0.1s;
}
.nav-menu .sub-menu li a:hover { color: #fff; background: #222; }

/* Hide the mobile hamburger — desktop only for now */
@media (max-width: 700px) {
  .nav-menu { display: none; }
}

/* ── HERO ── */
.hero {
  background: #111;
  padding: 4rem 1.5rem 3.5rem;
}
.hero-tag {
  display: inline-block;
  background: #e8ff00;
  color: #111;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 1.75rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 9vw, 5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.5rem;
}
.hero h1 span { color: #e8ff00; }
.hero-sub {
  font-size: 1rem;
  color: #cccccc;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2rem;
}
.hero-sub strong { color: #ffffff; font-weight: 600; }
.hero-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-yellow {
  background: #e8ff00;
  color: #111;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
}
.btn-yellow:hover { background: #d4eb00; }
.btn-outline {
  border: 1.5px solid #444;
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
}
.btn-outline:hover { border-color: #888; }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #2a2a2a;
  flex-wrap: wrap;
}
.stat-num { font-size: 1.75rem; font-weight: 900; color: #fff; letter-spacing: -0.02em; }
.stat-num span { color: #e8ff00; }
.stat-desc { font-size: 0.75rem; color: #bbb; margin-top: 0.2rem; font-weight: 500; }

/* ── PILLARS ── */
.pillars { background: #f5f5f5; padding: 4rem 1.5rem; border-top: 4px solid #e8ff00; }
.section-tag {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: #888;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.section-intro { color: #666; font-size: 0.92rem; line-height: 1.7; margin-bottom: 2.5rem; max-width: 500px; }

.pillar-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .pillar-grid { grid-template-columns: 1fr; } }
.pillar {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  padding: 1.5rem;
}
.pillar-num { font-size: 1.1rem; font-weight: 800; color: #e8ff00; background: #111; display: inline-block; padding: 0.2rem 0.5rem; border-radius: 2px; margin-bottom: 0.75rem; letter-spacing: 0.08em; }
.pillar h3 { font-size: 0.95rem; font-weight: 800; color: #111; margin-bottom: 0.5rem; line-height: 1.3; }
.pillar p { font-size: 0.82rem; color: #666; line-height: 1.65; }

/* ── ABOUT ── */
.about { background: #fff; padding: 4rem 1.5rem; }
.about-box {
  background: #111;
  border-radius: 10px;
  padding: 2.5rem 2rem;
  margin-top: 2rem;
}
.about-box p { color: #ddd; font-size: 0.92rem; line-height: 1.8; margin-bottom: 1rem; }
.about-box p strong { color: #fff; font-weight: 700; }
.creds { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.cred {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.83rem; color: #ddd; font-weight: 500;
}
.cred-dot { width: 7px; height: 7px; background: #e8ff00; border-radius: 50%; flex-shrink: 0; }

/* ── POSTS LAYOUT ── */
.posts-section { background: #f5f5f5; padding: 4rem 1.5rem; }
.posts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .posts-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── RECENT POSTS ── */
.posts-col-title {
  font-size: 1rem;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #111;
}
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e4e4e4;
  transition: background 0.1s;
}
.post-row:first-child { padding-top: 0; }
.post-row a {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}
.post-row a:hover { color: #555; }
.post-row-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #999;
  font-weight: 500;
}
.post-views {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #3b82f6;
  font-size: 0.75rem;
}

/* ── PAGINATION ── */
.ab-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.2rem !important;
  flex-wrap: wrap !important;
  margin-top: 1.5rem !important;
  background: transparent !important;
  height: auto !important;
  position: static !important;
  padding: 0 !important;
}
.ab-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: color 0.15s;
  font-family: 'Inter', sans-serif;
}
.ab-pagination .page-numbers:hover { color: #111; }
.ab-pagination .page-numbers.current {
  background: #111 !important;
  color: #e8ff00 !important;
  font-weight: 800;
}
.ab-pagination .page-numbers.dots {
  color: #bbb !important;
  pointer-events: none;
}
.ab-pagination .page-numbers.prev,
.ab-pagination .page-numbers.next {
  color: #555;
  font-size: 0.85rem;
}

/* ── TOP POSTS — 2-column card grid ── */
.top-posts-col { position: relative; }
.top-post-list {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem;
}
@media (max-width: 420px) {
  .top-post-list { grid-template-columns: 1fr !important; }
}
/* Each card */
.top-post-row {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.top-post-row:hover { border-color: #111; }
/* The inner wrapper is just a column flex */
.top-post-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}
/* Thumbnail — fixed height, image contained with white padding */
.top-post-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 160px;
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
  flex-shrink: 0;
  padding: 0.5rem;
}
.top-post-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* No-thumbnail: dark placeholder keeps consistent height */
.top-post-no-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  flex-shrink: 0;
}
/* Text area below image */
.top-post-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.7rem 0.7rem;
  flex: 1;
}
.top-post-num {
  font-size: 0.6rem;
  font-weight: 800;
  color: #e8ff00;
  background: #111;
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  letter-spacing: 0.06em;
  align-self: flex-start;
}
.top-post-text > a {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}
.top-post-text > a:hover { color: #444; }
.top-post-row-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: #777;
  margin-top: auto;
  padding-top: 0.3rem;
  flex-wrap: wrap;
}

/* ── CONTENT PAGES (page.php / single.php / archive.php) ── */
.content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.content-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.content-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
}
.content-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #222;
}
.content-body h2, .content-body h3, .content-body h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
  color: #111;
}
.content-body p { margin-bottom: 1.25rem; }
.content-body a { color: #111; text-decoration: underline; }
.content-body img { max-width: 100%; height: auto; border-radius: 6px; }
.content-body pre, .content-body code {
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 0.88em;
}
.content-body pre { padding: 1rem; overflow-x: auto; margin-bottom: 1.25rem; }
.content-body code { padding: 0.1em 0.35em; }

/* ── CTA ── */
.cta { background: #e8ff00; padding: 4rem 1.5rem; text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 900; color: #111; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.cta p { color: #444; font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.6; }
.btn-black { background: #111; color: #e8ff00; font-weight: 800; font-size: 0.9rem; padding: 0.85rem 2rem; border-radius: 4px; display: inline-block; }
.btn-black:hover { background: #333; }

/* ── FOOTER ── */
footer { background: #111; padding: 2.5rem 1.5rem; text-align: center; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.footer-links a { color: #666; font-size: 0.8rem; font-weight: 500; }
.footer-links a:hover { color: #fff; }
footer p { color: #444; font-size: 0.78rem; }

/* ── Blog archive page ── */
.blog-hero { background: #111; padding: 3rem 1.5rem 2.5rem; }
.blog-hero-title { font-size: clamp(1.8rem, 6vw, 3.5rem); font-weight: 900; letter-spacing: -0.03em; color: #fff; margin: 0 0 0.6rem; line-height: 1.0; }
.blog-hero-sub { color: #999; font-size: 0.88rem; max-width: 520px; margin: 0; }
.blog-list-wrap { max-width: 780px; margin: 0 auto; padding: 2.5rem 0 4rem; }
.blog-list-wrap .post-row { padding-left: 1.5rem; padding-right: 1.5rem; border-bottom: 1.5px solid #e8e8e8; }
.blog-list-wrap .post-row:first-child { border-top: 1.5px solid #e8e8e8; }
.blog-list-wrap .ab-pagination { padding: 1.5rem 1.5rem 0; }
