/*
Theme Name:   Kongolo
Theme URI:    https://jonathankongolo.com
Author:       Jonathan Kongolo
Author URI:   https://jonathankongolo.com
Description:  Block theme for a developer CV, project portfolio and blog. Typographic, no jQuery, no framework, light and dark aware. Design tokens live in theme.json.
Version:      1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  kongolo
Tags:         portfolio, blog, one-column, block-patterns, full-site-editing
*/

/* ------------------------------------------------------------------
   theme.json carries the design system. This file holds only what
   theme.json cannot express.
   ------------------------------------------------------------------ */

/* Automatic dark mode. WordPress emits the palette as custom properties,
   so overriding them here re-themes every block at once — no per-block CSS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wp--preset--color--base: #14181d;
    --wp--preset--color--surface: #1c2128;
    --wp--preset--color--contrast: #e8ecf1;
    --wp--preset--color--muted: #9aa5b1;
    --wp--preset--color--accent: #7fb3d9;
    --wp--preset--color--line: #2b323b;
  }
}

:root[data-theme="dark"] {
  --wp--preset--color--base: #14181d;
  --wp--preset--color--surface: #1c2128;
  --wp--preset--color--contrast: #e8ecf1;
  --wp--preset--color--muted: #9aa5b1;
  --wp--preset--color--accent: #7fb3d9;
  --wp--preset--color--line: #2b323b;
}

/* Skip link — visible only on focus. */
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 999;
  padding: 0.6rem 1rem;
  background: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  border-radius: 4px;
}

/* Underline links on hover only, so body copy stays calm. */
:where(.entry-content, .wp-block-post-content) a:where(:not(.wp-element-button)) {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Wide content that must not break the page: tables, pre, iframes. */
.wp-block-table,
.wp-block-code,
pre {
  overflow-x: auto;
  max-width: 100%;
}

pre,
code,
kbd {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.92em;
}

.wp-block-code {
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  background: var(--wp--preset--color--surface);
}

/* Project meta table on single-project. */
.jk-meta {
  border-top: 1px solid var(--wp--preset--color--line);
  margin: 0 0 var(--wp--preset--spacing--50);
}

.jk-meta__row {
  display: grid;
  grid-template-columns: minmax(120px, 22%) 1fr;
  gap: 0 1.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--wp--preset--color--line);
}

.jk-meta__label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--wp--preset--color--accent);
  letter-spacing: 0.02em;
}

.jk-meta__value {
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .jk-meta__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Cards — used by the project grid and the "what I do" pattern. */
.jk-card {
  height: 100%;
  padding: var(--wp--preset--spacing--40);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 8px;
  background: var(--wp--preset--color--surface);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.jk-card:hover {
  transform: translateY(-2px);
  border-color: var(--wp--preset--color--accent);
}

/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
