/*
Theme Name: Ike Chua Blog
Theme URI: https://blog.ikechua.com/
Author: Ike Chua
Description: A fast editorial WordPress theme for Ike Chua's writing on AI, cybersecurity, content marketing, and work.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ikechua-blog
*/

:root {
  --bg: #f7f8fb;
  --paper: #fff;
  --ink: #121826;
  --muted: #667085;
  --line: #d9dee8;
  --accent: #164fd9;
  --accent-soft: #eef2ff;
  --max: 1120px;
  --radius: 18px;
  --shadow: 0 16px 50px rgba(16, 24, 40, .06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.site-header .wrap { padding: 34px 0 22px; }
.brand {
  display: inline-block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 820;
}
.tagline { margin: 10px auto 22px; color: var(--muted); max-width: 560px; }
.primary-menu,
.footer-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #344054;
  font-weight: 720;
}

.lead-post {
  margin: 42px 0;
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.lead-image {
  position: absolute;
  inset: 0;
}
.lead-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,7,18,.78), rgba(3,7,18,.34) 56%, rgba(3,7,18,.12));
}
.lead-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eyebrow {
  color: var(--accent);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 820;
}
.lead-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 clamp(26px, 5vw, 58px) clamp(18px, 3vw, 34px);
  color: #fff;
}
.lead-copy .eyebrow { color: #a8c7ff; }
.lead-copy h1 {
  max-width: 1120px;
  margin: 12px 0 16px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.14;
  letter-spacing: 0;
  font-weight: 720;
}
.lead-copy p {
  max-width: 1120px;
  color: rgba(255,255,255,.86);
  font-size: 1.08rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  align-items: start;
  margin-bottom: 80px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2,
.side-card h2 {
  margin: 0;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.section-head a { color: var(--accent); font-weight: 760; }
.post-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.post-row img {
  width: 180px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}
.post-row h3 {
  margin: 8px 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 740;
}
.post-row p { margin: 0; color: #475467; }
.meta { color: var(--muted); font-weight: 650; }

.home-sidebar,
.article-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
}
.side-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.side-card > a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-weight: 720;
  line-height: 1.25;
}
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics a,
.topics span {
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 760;
}
.about p { color: #475467; margin-bottom: 0; }
.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.search-field {
  min-height: 44px;
  min-width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
}
.search-form button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 760;
}

.single-head {
  padding: 52px 0 30px;
  display: grid;
  gap: 24px;
}
.single-head h1 {
  max-width: 920px;
  margin: 10px 0;
  font-size: clamp(2.15rem, 4.4vw, 4.55rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 740;
}
.single-head img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: 0 20px 70px rgba(16,24,40,.12);
}
.single-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 54px;
  align-items: start;
  margin: 44px auto 80px;
}
.entry-content {
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.78;
}
.entry-content > * { max-width: none; }
.entry-content h2,
.entry-content h3 {
  margin: 2.2em 0 .7em;
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 740;
}
.entry-content h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.entry-content h3 { font-size: clamp(1.4rem, 2vw, 2rem); }
.entry-content blockquote {
  margin: 2em 0;
  padding: 20px;
  border-left: 8px solid var(--accent);
  background: var(--accent-soft);
  font-weight: 760;
}
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-sidebar .side-card { background: rgba(255,255,255,.82); }
.toc-list { margin: 0; padding: 0; list-style: none; }
.toc-list a { display: block; padding: 8px 0; color: #344054; font-weight: 760; }
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 54px;
}
.post-nav a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  font-weight: 720;
}
.post-nav span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.archive-header {
  padding: 48px 0 20px;
}
.archive-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.05;
  font-weight: 760;
}
.pagination { margin: 36px 0 80px; font-weight: 760; }
.pagination .page-numbers {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin: 0 3px 6px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
}
.site-footer .wrap {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .lead-post,
  .content-layout,
  .post-row,
  .single-content,
  .post-nav {
    grid-template-columns: 1fr;
  }
  .lead-post { min-height: 500px; }
  .home-sidebar,
  .article-sidebar { position: static; }
  .post-row img { width: 100%; aspect-ratio: 16 / 9; }
  .single-head img { aspect-ratio: 16 / 10; border-radius: 22px; }
}
