/* ============================================================
   AB1 — Andrew Boardman personal site
   ============================================================ */


/* FONTS
   ------------------------------------------------------------ */

@font-face {
  font-family: 'PPFragment-Glare';
  src: url('../fonts/PPFragment-GlareRegular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'PPFragment-Glare';
  src: url('../fonts/PPFragment-GlareBold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'PPFragment-Sans';
  src: url('../fonts/PPFragment-SansRegular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'PPFragment-Sans';
  src: url('../fonts/PPFragment-SansRegularitalic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'PPFragment-Sans';
  src: url('../fonts/PPFragment-SansBold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}



/* VARIABLES
   ------------------------------------------------------------ */

:root {
  --bg:     #F5F2E5;
  --sans:   'PPFragment-Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif:  'PPFragment-Glare', Georgia, 'Times New Roman', serif;
  --text:   hsla(214, 70%, 4%, 0.85);
  --muted:  hsla(0, 0%, 2%, 0.6);
  --rule:   #ccc;
  --width:  740px;
  --pad:    2.4rem;
}


/* RESET
   ------------------------------------------------------------ */

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

html {
  font-size: 62.5%;
  background: var(--bg);
  color: var(--text);
}

body.page-template { --bg: #F7F4E8; }


body {
  font-family: var(--sans);
  font-size: 1.6rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); }


/* ACCESSIBILITY
   ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--bg);
  color: var(--text);
  padding: 0.8rem 1.6rem;
  z-index: 999;
  font-size: 1.4rem;
  text-decoration: none;
  border: 1px solid var(--rule);
}

.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}


/* LAYOUT
   ------------------------------------------------------------ */

.page-wrap {
  max-width: var(--width);
  margin: 0 auto;
  padding: 4rem var(--pad) 6rem;
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3.2rem 0;
}

.rule--dark { border-top-color: var(--text); }


/* SITE HEADER
   ------------------------------------------------------------ */

.site-header { margin-bottom: 4rem; }

.site-header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-name-link {
  text-decoration: none;
  display: inline-block;
}

.site-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: -0.02rem;
  line-height: 1.2;
}

.site-tagline {
  font-size: 1.6rem;
  color: var(--muted);
  padding-top: 0.8rem;
  line-height: 1.2;
}

.site-nav { display: flex; gap: 1.6rem; }

.site-nav-link {
  font-size: 1.6rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav-link:hover { opacity: 0.7; }

@media (max-width: 480px) {
  .site-header-top { flex-direction: column; gap: 0.8rem; }
  .site-nav { gap: 1.4rem; flex-wrap: wrap; }
  .site-nav-link { font-size: 1.4rem; }
  .footer-bottom { flex-direction: column; gap: 0.8rem; }
  .img-float-left { max-width: 100%; float: none; margin: 0 0 1.6rem; }
  .footer-subscribe-form { flex-direction: column; }
  .footer-subscribe-btn { width: 100%; text-align: center; }
}


/* SITE FOOTER
   ------------------------------------------------------------ */

.site-footer { margin-top: 4rem; }

.footer-subscribe {
  background: rgba(190, 100, 100, 0.045);
  border: 0.5px solid rgba(255, 85, 85, 0.7);
  border-radius: 5px;
  padding: 3.2rem;
  margin: 3.7rem 0 3.2rem;
  transition: background 0.2s ease;
}

.footer-subscribe:hover { background: rgba(190, 100, 100, 0.0175); }

.footer-subscribe-heading .section-chevron { height: 0.7em; margin-right: 0.6rem; }
.hp-section-label .section-chevron { height: 0.6em; margin-right: 1rem; }

.footer-subscribe-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.3;
  margin: 0 0 0.9rem;
}

.footer-subscribe-text {
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.footer-subscribe-form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.7rem;
}

.footer-subscribe-input {
  font-family: var(--sans);
  font-size: 1.5rem;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text);
  padding: 0.7rem 1.2rem;
  flex: 1;
  min-width: 20rem;
  outline: none;
}

.footer-subscribe-input::placeholder { color: var(--text); opacity: 0.5; }
.footer-subscribe-input:focus { border-color: var(--text); }

.footer-subscribe-btn {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 700;
  background: #FF5555;
  color: #fff;
  border: none;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  white-space: nowrap;
}

.footer-subscribe-btn:hover { opacity: 0.8; }

.footer-subscribe-success,
.footer-subscribe-error {
  font-size: 1.4rem;
  margin: 0.8rem 0 0;
  width: 100%;
}

.footer-subscribe-success { color: var(--text); }
.footer-subscribe-error   { color: #c0392b; }

.footer-subscribe-note {
  font-size: 1.4rem;
  color: var(--muted);
  margin: 0.8rem 0 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.6rem;
  margin-top: -0.3rem;
}

.footer-copyright {
  font-size: 1.6rem;
  color: var(--muted);
}

.footer-links {
  font-size: 1.6rem;
  color: var(--muted);
}

.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { opacity: 0.7; }


/* ============================================================
   HOMEPAGE
   ============================================================ */

.hp-statement { margin: 3.5rem 0 0; }

.hp-statement-inner {
  display: flex;
  align-items: flex-start;
  gap: 3.2rem;
}

.hp-statement-text p:first-child {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 3.2rem;
  line-height: 1.3;
  margin-bottom: 1.6rem;
}

.hp-statement-text p:not(:first-child) {
  font-family: var(--sans);
  font-size: 1.8rem;
  line-height: 1.6;
  color: var(--text);
}

.hp-headshot {
  width: 245px;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 5px;
}

@media (max-width: 580px) {
  .hp-statement-inner { flex-direction: column-reverse; gap: 1.6rem; }
  .hp-headshot { width: 100%; }
}

/* Services */

.hp-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.2rem;
}

@media (max-width: 580px) {
  .hp-services-grid { grid-template-columns: 1fr; }
}

.hp-service p { font-size: 1.6rem; line-height: 1.6; }
.hp-service a { text-decoration: underline; }
.hp-service a:hover { text-decoration: none; opacity: 0.7; }

.hp-service-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text);
  margin: 0 0 0.8rem;
}

/* Editable body content (home-content, home-bio) */

.hp-body-content { font-size: 1.8rem; line-height: 1.7; }

.hp-body-content h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text);
  margin: 0 0 0.8rem;
}

.hp-body-content h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.3;
  margin: 2.4rem 0 0.8rem;
}

/* Rule above the second h2 (Selected Clients) */
.hp-body-content h2 ~ h2 {
  border-top: 1px solid var(--rule);
  padding-top: 3.2rem;
  margin-top: 3.2rem;
}

.hp-body-content p { margin: 0 0 1.6rem; }
.hp-body-content p:last-child { margin-bottom: 0; }

/* Testimonial */
.hp-body-content blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.45;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}

.hp-body-content blockquote + p {
  font-size: 1.4rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* Client list */
.hp-body-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 0.5rem;
  font-size: 1.6rem;
}

@media (max-width: 580px) {
  .hp-body-content ul { grid-template-columns: repeat(2, 1fr); }
}

/* Recent Writing */

.section-chevron {
  display: inline-block;
  height: 0.5em;
  width: auto;
  vertical-align: baseline;
  margin-right: 1.2rem;
}

.hp-section-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.hp-posts { list-style: none; padding: 0; margin: 0; }

.hp-post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.6rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hp-post-item:last-child { border-bottom: none; }
.hp-post-item:hover { transform: translateX(3px); opacity: 0.825; }

.hp-post-text { flex: 1; }

.hp-post-link { color: var(--text); text-decoration: underline; font-size: 1.8rem; }
.hp-post-link:hover { text-decoration: none; opacity: 0.7; }

.hp-post-excerpt {
  font-size: 1.6rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
  line-height: 1.5;
}

.hp-post-date {
  font-size: 1.4rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ============================================================
   POST PAGE
   ============================================================ */

.post-header { margin-bottom: 3.2rem; }

.post-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 3.2rem;
  line-height: 1.3;
  margin: 0 0 1.2rem;
}

.post-excerpt {
  font-size: 1.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 2.4rem;
}

.post-feature-figure { margin: 0 0 0.8rem; }

.post-feature-image { width: 100%; height: auto; border-radius: 5px; }

.post-feature-caption {
  font-size: 1.4rem;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.post-date {
  display: block;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--text);
  margin: 1.6rem 0 -0.2rem;
}

/* Post body */

.post-content { font-size: 1.8rem; line-height: 1.7; }

.post-content p { margin: 0 0 1.8rem; }

.post-content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1.45;
  margin: 3.2rem 0 1.2rem;
}

.post-content h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.3;
  margin: 2.4rem 0 0.8rem;
}

.post-content h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--muted);
  margin: 2rem 0 0.6rem;
}

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

.post-content blockquote {
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.6;
  margin: 2.9rem 0;
  padding: 0 0 0 2rem;
  border-left: 2px solid var(--rule);
}

.post-content ul,
.post-content ol {
  padding-left: 2.4rem;
  margin: 0 0 1.8rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content figure { margin: 2.4rem 0; }

.post-content figure img { width: 100%; height: auto; }

.post-content figcaption {
  font-size: 1.4rem;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3.2rem 0;
}

.post-content pre {
  background: hsla(0, 0%, 0%, 0.05);
  padding: 1.6rem;
  overflow-x: auto;
  font-size: 1.4rem;
  line-height: 1.5;
  margin: 0 0 1.8rem;
}

.post-content code {
  font-size: 0.9em;
  background: hsla(0, 0%, 0%, 0.05);
  padding: 0.1em 0.4em;
}

.post-content pre code { background: none; padding: 0; }


/* ============================================================
   PAGE (About, Coaching, etc.)
   ============================================================ */

.about-hero-figure {
  float: right;
  width: 245px;
  margin: 1rem 0 0.8rem 3.2rem;
}

.about-hero {
  width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
}

.about-hero-figure figcaption {
  font-size: 1.4rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.4;
}

@media (max-width: 580px) {
  .about-hero-figure { float: none; width: 100%; margin: 0 0 2.4rem; }
}

.page-feature-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.2rem;
}

.page-feature-caption {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 2.4rem;
}

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 3.2rem;
  line-height: 1.3;
  margin: 0 0 0.8rem;
}

.page-subtitle {
  font-size: 1.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 2.4rem;
}

.page-content { font-size: 1.8rem; line-height: 1.7; }

.page-content p { margin: 0 0 1.8rem; }

.page-content h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1.3;
  margin: 3.2rem 0 0.8rem;
}

.page-content h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.3;
  margin: 2.4rem 0 0.8rem;
}

.page-content h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--muted);
  margin: 2rem 0 0.4rem;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3.2rem 0;
}

.page-content ol { padding-left: 2.4rem; margin: 0 0 1.6rem; }

.page-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 0.5rem;
  font-size: 1.7rem;
}

@media (max-width: 580px) {
  .page-content ul { grid-template-columns: repeat(2, 1fr); }
}

.img-float-left {
  display: block;
  margin: 2.9rem 0 0;
  max-width: 200px;
}

.page-content .kg-image-card { margin-top: 1.5rem; margin-bottom: -0.5rem; }
.page-content li { margin-bottom: 0.4rem; }
.page-content a  { color: var(--text); text-decoration: underline; }
.page-content a:hover { text-decoration: none; opacity: 0.7; }

.page-content figcaption {
  font-size: 1.4rem;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.page-content blockquote {
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1.6;
  margin: 2.9rem 0;
  padding: 0 0 0 2rem;
  border-left: 2px solid var(--rule);
}


/* ============================================================
   TAG / ARCHIVE
   ============================================================ */

.tag-header { margin-bottom: 3.2rem; }

.tag-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1.3;
  margin: 0 0 0.8rem;
}

.tag-description { font-size: 1.6rem; color: var(--muted); }

.post-list { list-style: none; padding: 0; margin: 0; }

.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list-item:last-child { border-bottom: none; }

.post-list-link { color: var(--text); text-decoration: none; }
.post-list-link:hover { text-decoration: none; }

.post-list-date {
  font-size: 1.4rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3.2rem 0 0;
  font-size: 1.5rem;
  color: var(--muted);
}

.pagination a { color: var(--text); text-decoration: none; }
.pagination a:hover { text-decoration: none; }


/* ============================================================
   ERROR PAGE
   ============================================================ */

.error-page { text-align: center; padding: 8rem 0; }

.error-code {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 8rem;
  color: var(--muted);
  line-height: 1;
  margin: 0 0 1.6rem;
}

.error-message { font-size: 1.9rem; margin: 0 0 2.4rem; }

.error-link { color: var(--text); text-decoration: none; font-size: 1.5rem; }
.error-link:hover { text-decoration: none; }


/* ============================================================
   GHOST PORTAL + CARDS
   ============================================================ */

#ghost-portal-root iframe[title="portal-trigger"] { display: none !important; }

.kg-width-wide  { margin-left: -4rem; margin-right: -4rem; }
.kg-width-full  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

.post-content .kg-image-card,
.post-content .kg-gallery-card { margin: 2.4rem 0; }

.post-content .kg-image-card img { width: 100%; }

.post-content .kg-bookmark-card {
  border: 1px solid var(--rule);
  padding: 1.6rem;
  margin: 2.4rem 0;
}

.post-content .kg-bookmark-title { font-weight: 700; margin-bottom: 0.4rem; }
.post-content .kg-bookmark-description { font-size: 1.4rem; color: var(--muted); }

.post-content .kg-callout-card {
  background: hsla(0, 0%, 0%, 0.04);
  padding: 1.6rem;
  margin: 2.4rem 0;
  display: flex;
  gap: 1.2rem;
}

.post-content .kg-toggle-card {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0;
  margin: 2.4rem 0;
}
