/*
Theme Name: José Picardo
Theme URI: https://josepicardo.com
Author: José Picardo
Author URI: https://www.azimuth.org.uk
Description: Personal site and writing archive for José Picardo. Front page is a CV and online card; the blog lives on as a searchable archive. Follows the Azimuth Partners design language: Fraunces and DM Sans, warm neutrals, one aubergine accent. Includes a command palette (press /) and an AI-legible layer (llms.txt, schema.org).
Version: 1.0.6
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: josepicardo
Tags: blog, portfolio, one-column
*/

/* ==========================================================================
   1. Design tokens (Azimuth design language)
   ========================================================================== */

:root {
  /* Neutrals: the canvas */
  --warm-white: #f5f3ef;
  --stone: #e8e5df;
  --clay-wash: #f0e2d6;
  --mauve-wash: #ece0e6;  /* pale mauve panel; echoes the soft-mauve accent */
  --white: #ffffff;
  --charcoal: #545454;
  --black-olive: #2b2820;

  /* Lead accent: small use only, never a background */
  --aubergine: #6e3f5e;

  /* CTA band accent on dark */
  --soft-mauve: #caa9b6;

  /* Type */
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --size-display: clamp(2.125rem, 5.5vw, 3rem); /* hero name only */
  --size-h1: 1.5rem;     /* 24px */
  --size-h2: 1.125rem;   /* 18px */
  --size-h3: 0.9375rem;  /* 15px */
  --size-body: 0.9375rem;/* 15px */
  --size-caption: 0.75rem; /* 12px */

  --leading-body: 1.7;
  --leading-heading: 1.2;

  /* Layout */
  --measure: 44rem;
  --measure-wide: 52rem;
  --radius: 10px;
  --radius-small: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

/* ==========================================================================
   2. Fonts (self-hosted, variable)
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('assets/fonts/dm-sans-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   3. Base
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-heading);
  color: var(--charcoal);
  margin: 0 0 var(--space-2);
}

h1, h2 { font-family: var(--font-heading); font-weight: 500; }
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3, h4, h5, h6 { font-family: var(--font-body); font-weight: 500; font-size: var(--size-h3); }

p { margin: 0 0 var(--space-2); }

a {
  color: var(--charcoal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(84, 84, 84, 0.4);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover, a:focus { color: var(--aubergine); text-decoration-color: var(--aubergine); }

img { max-width: 100%; height: auto; border-radius: var(--radius-small); }

blockquote {
  margin: var(--space-3) 0;
  padding: 0 0 0 var(--space-3);
  border-left: 3px solid var(--aubergine);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.0625rem;
}

hr {
  border: none;
  border-top: 1px solid var(--stone);
  margin: var(--space-4) 0;
}

code, pre {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--stone);
  border-radius: var(--radius-small);
}
code { padding: 0.1em 0.35em; }
pre { padding: var(--space-2); overflow-x: auto; }
pre code { background: none; padding: 0; }

::selection { background: var(--clay-wash); }

/* The signature editorial italic accent: once per page */
.accent-phrase { font-family: var(--font-heading); font-style: italic; color: var(--aubergine); }
.accent-stop { color: var(--aubergine); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  overflow: hidden;
}
.skip-link:focus {
  position: fixed !important;
  top: 8px; left: 8px;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  background: var(--black-olive);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-small);
  z-index: 200;
}

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

/* ==========================================================================
   4. Layout shell
   ========================================================================== */

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--space-3); }
.wrap--wide { max-width: var(--measure-wide); }

.site-header {
  padding: var(--space-3) 0;
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.site-wordmark {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--charcoal);
  text-decoration: none;
}
.site-wordmark:hover { color: var(--charcoal); }
.site-wordmark .accent-stop { font-weight: 500; }

.site-nav { display: flex; align-items: baseline; gap: var(--space-3); }
.site-nav a {
  font-size: var(--size-h3);
  font-weight: 500;
  text-decoration: none;
}
.site-nav ul { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }

.nav-search {
  font: inherit;
  font-size: var(--size-h3);
  font-weight: 500;
  color: var(--charcoal);
  background: none;
  border: 1px solid var(--stone);
  border-radius: var(--radius-small);
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  transition: background 120ms ease;
}
.nav-search:hover { background: var(--stone); }
.nav-search kbd {
  font-family: inherit;
  font-size: var(--size-caption);
  border: 1px solid var(--stone);
  border-radius: 4px;
  padding: 0 0.3em;
  margin-left: 0.4em;
  background: var(--white);
}

.site-main { padding: var(--space-3) 0 var(--space-5); }

/* ==========================================================================
   5. Front page: the card
   ========================================================================== */

.card-hero { padding: var(--space-4) 0 var(--space-3); }

.card-hero__inner {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

.card-hero__portrait {
  width: 132px; height: 132px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.card-hero__name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-display);
  line-height: 1.1;
  margin: 0 0 var(--space-1);
}

.card-hero__line {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-h1);
  line-height: 1.35;
  margin: 0 0 var(--space-2);
  max-width: 34ch;
}

.card-hero__bio { max-width: 58ch; }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}
.contact-row a {
  display: inline-block;
  font-size: var(--size-h3);
  font-weight: 500;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  transition: background 120ms ease, border-color 120ms ease;
}
.contact-row a:hover { background: var(--stone); color: var(--charcoal); }
.contact-row a.is-primary {
  background: var(--black-olive);
  border-color: var(--black-olive);
  color: var(--white);
}
.contact-row a.is-primary:hover { background: var(--charcoal); border-color: var(--charcoal); }

/* Section scaffolding */
.cv-section { padding: var(--space-4) 0 0; }
.cv-section > .wrap > h2,
.cv-section__title {
  font-size: var(--size-h2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--stone);
  margin-bottom: var(--space-3);
}

/* Now strip */
.now-strip {
  background: var(--mauve-wash);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.now-strip__role { margin-bottom: var(--space-2); }
.now-strip__role strong { font-weight: 500; }
.now-strip__feed { list-style: none; margin: 0; padding: 0; }
.now-strip__feed li {
  padding: var(--space-1) 0;
  border-top: 1px solid rgba(84, 84, 84, 0.12);
}
.now-strip__feed a { text-decoration: none; font-weight: 500; }
.now-strip__feed a:hover { text-decoration: underline; }
.now-strip__date {
  font-size: var(--size-caption);
  color: var(--charcoal);
  opacity: 0.75;
  margin-left: 0.5em;
}
.now-strip__more { margin: var(--space-2) 0 0; font-size: var(--size-h3); }

/* CV timeline */
.cv-roles { list-style: none; margin: 0; padding: 0; }
.cv-role {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}
.cv-role + .cv-role { border-top: 1px solid var(--stone); }
.cv-role__period {
  font-size: var(--size-h3);
  font-weight: 500;
  opacity: 0.75;
}
.cv-role__title { font-weight: 500; margin: 0; font-size: var(--size-body); font-family: var(--font-body); }
.cv-role__org { margin: 0; }
.cv-role__note { margin: var(--space-1) 0 0; }

/* Books */
.book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.book {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.book__title { font-family: var(--font-heading); font-weight: 500; font-style: italic; font-size: var(--size-h2); margin: 0 0 0.25rem; }
.book__meta { font-size: var(--size-h3); opacity: 0.8; margin: 0 0 var(--space-1); }
.book__desc { margin: 0; }
.book__tag {
  display: inline-block;
  font-size: var(--size-caption);
  font-weight: 500;
  color: var(--aubergine);
  border: 1px solid var(--aubergine);
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  margin-left: 0.5em;
  vertical-align: middle;
}

/* Speaking and writing: two columns on wide screens */
.cv-columns { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cv-columns { grid-template-columns: 1fr 1fr; } }
.cv-columns ul { margin: 0; padding: 0 0 0 1.1em; }
.cv-columns li { margin-bottom: var(--space-1); }

/* Personal note */
.personal-note {
  background: var(--clay-wash);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.personal-note p:last-child { margin-bottom: 0; }

/* Archive teaser */
.archive-teaser p { max-width: 58ch; }
.archive-teaser .palette-hint { font-size: var(--size-h3); opacity: 0.85; }
.palette-hint kbd {
  font-family: inherit;
  font-size: var(--size-caption);
  border: 1px solid var(--stone);
  background: var(--white);
  border-radius: 4px;
  padding: 0.05em 0.4em;
}

/* Closing CTA band: black olive, soft mauve accent */
.cta-band {
  margin-top: var(--space-5);
  background: var(--black-olive);
  color: var(--white);
  padding: var(--space-4) 0;
}
.cta-band h2 {
  color: var(--white);
  font-size: var(--size-h1);
  border: none;
  margin-bottom: var(--space-2);
  max-width: 30ch;
}
.cta-band .accent-phrase, .cta-band .accent-stop { color: var(--soft-mauve); }
.cta-band p { max-width: 58ch; color: rgba(255, 255, 255, 0.85); }
.button-inverse {
  display: inline-block;
  font-weight: 500;
  font-size: var(--size-h3);
  color: var(--black-olive);
  background: var(--stone);
  border-radius: var(--radius-small);
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  margin-top: var(--space-1);
}
.button-inverse:hover { background: var(--warm-white); color: var(--black-olive); }

/* ==========================================================================
   6. Archive, posts, pages
   ========================================================================== */

.page-title-block { padding: var(--space-3) 0 var(--space-2); }
.page-title-block h1 { margin-bottom: var(--space-1); }
.page-title-block .intro { max-width: 58ch; }

.archive-year {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--size-h2);
  margin: var(--space-4) 0 var(--space-1);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--stone);
}
.archive-year:first-of-type { margin-top: var(--space-2); }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(84, 84, 84, 0.1);
}
.post-list time {
  flex-shrink: 0;
  width: 5.5rem;
  font-size: var(--size-caption);
  opacity: 0.7;
}
.post-list a { text-decoration: none; font-weight: 500; }
.post-list a:hover { text-decoration: underline; }

.pagination { display: flex; gap: var(--space-2); justify-content: space-between; margin-top: var(--space-4); }
.pagination a, .pagination span { font-weight: 500; font-size: var(--size-h3); }

/* Single post */
.entry-header { padding: var(--space-3) 0 var(--space-2); }
.entry-meta { font-size: var(--size-caption); opacity: 0.75; }
.entry-content { max-width: var(--measure); }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin-top: var(--space-4); }
.entry-content h3 { margin-top: var(--space-3); }

.archive-notice {
  background: var(--stone);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: var(--size-h3);
  margin: var(--space-2) 0 var(--space-3);
}
.archive-notice p { margin: 0; }

.post-nav { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); }
.post-nav a { font-size: var(--size-h3); font-weight: 500; text-decoration: none; max-width: 45%; }
.post-nav a:hover { text-decoration: underline; }

/* ==========================================================================
   7. Footer
   ========================================================================== */

.site-footer {
  background: var(--black-olive);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-4) 0;
  margin-top: var(--space-5);
}
.front-page .site-footer { margin-top: 0; }
.site-footer a { color: var(--white); text-decoration-color: rgba(255, 255, 255, 0.4); }
.site-footer a:hover { color: var(--soft-mauve); text-decoration-color: var(--soft-mauve); }
.footer-definition {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--size-h2);
  color: var(--soft-mauve);
  max-width: 48ch;
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.footer-links a { font-size: var(--size-h3); font-weight: 500; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-colophon { font-size: var(--size-caption); color: rgba(255, 255, 255, 0.6); margin: 0; }

/* ==========================================================================
   8. Command palette
   ========================================================================== */

.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 40, 32, 0.45);
  display: none;
  z-index: 100;
}
.palette-backdrop.is-open { display: block; }

.palette {
  position: fixed;
  top: min(14vh, 9rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(38rem, calc(100vw - 2rem));
  background: var(--warm-white);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(43, 40, 32, 0.35);
  display: none;
  z-index: 101;
  overflow: hidden;
}
.palette.is-open { display: block; }

.palette__input {
  width: 100%;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--charcoal);
  background: var(--warm-white);
  border: none;
  border-bottom: 1px solid var(--stone);
  padding: var(--space-2) var(--space-3);
  outline: none;
}
.palette__input::placeholder { color: rgba(84, 84, 84, 0.55); }

.palette__results {
  max-height: min(50vh, 24rem);
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: var(--space-1) 0;
}
.palette__group {
  font-size: var(--size-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  padding: var(--space-1) var(--space-3) 0.2rem;
}
.palette__item a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.55rem var(--space-3);
  text-decoration: none;
}
.palette__item a:hover { background: var(--stone); color: var(--charcoal); }
.palette__item.is-active a { background: var(--stone); }
.palette__item .t { font-weight: 500; }
.palette__item .t mark { background: var(--clay-wash); color: inherit; border-radius: 3px; padding: 0 1px; }
.palette__item .m { font-size: var(--size-caption); opacity: 0.65; flex-shrink: 0; }
.palette__empty { padding: var(--space-2) var(--space-3); opacity: 0.7; }
.palette__foot {
  display: flex;
  gap: var(--space-2);
  border-top: 1px solid var(--stone);
  padding: 0.45rem var(--space-3);
  font-size: var(--size-caption);
  opacity: 0.65;
}
.palette__foot kbd {
  font-family: inherit;
  border: 1px solid var(--stone);
  background: var(--white);
  border-radius: 4px;
  padding: 0 0.35em;
}

/* ==========================================================================
   9. Small screens, motion, print
   ========================================================================== */

@media (max-width: 560px) {
  .cv-role { grid-template-columns: 1fr; gap: 0.15rem; }
  .card-hero__inner { gap: var(--space-3); }
  .post-list time { width: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* The front page prints as a clean CV */
@media print {
  .site-header, .site-footer, .cta-band, .nav-search, .now-strip__more,
  .archive-teaser, .palette, .palette-backdrop, .contact-row a.is-primary { display: none !important; }
  body { background: #fff; color: #222; font-size: 11pt; }
  .contact-row a { border: none; padding: 0; background: none; text-decoration: underline; }
  .cv-section { padding-top: 1.5rem; }
  .now-strip, .personal-note, .book { background: none; border: 1px solid #ddd; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .card-hero__portrait { width: 90px; height: 90px; }
}
