/*
Theme Name:     Geekist (Child)
Theme URI:      https://geekist.co/
Description:    Custom child theme for Twenty Twenty-Five
Author:         Jason Nathan
Template:       twentytwentyfive
Version:        1.1.16
*/

* {
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

body {
  line-height: 1.6;
  word-spacing: 0.02em;
  font-feature-settings: 'kern', 'liga', 'calt';
}

/* ---- Global UI transition tokens ---- */
:root {
  --ui-trns-fast: 150ms;
  --ui-trns-med: 220ms;
  --ui-trns-ease: cubic-bezier(0.22, 0.61, 0.36, 1); /* “standard” ease */
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --ui-trns-fast: 0ms;
    --ui-trns-med: 0ms;
  }
}

/* ---- Minimal, low-specificity transition baseline ---- */
/* Buttons (WP block + native), links, and other interactive controls */
:root
  body
  :where(
    .wp-element-button,
    .wp-block-button__link,
    .wp-block-file__button,
    .wp-block-navigation-item__content,
    button,
    [type='button'],
    [type='submit'],
    [role='button'],
    a
  ) {
  transition:
    background-color var(--ui-trns-med) var(--ui-trns-ease),
    color var(--ui-trns-fast) var(--ui-trns-ease),
    border-color var(--ui-trns-fast) var(--ui-trns-ease),
    box-shadow var(--ui-trns-fast) var(--ui-trns-ease),
    transform var(--ui-trns-fast) var(--ui-trns-ease);
}

/* Default button hover: soft gray background with light text */
:root body :where(.wp-element-button:hover, .wp-block-button__link:hover) {
  background-color: #3c3c3c !important; /* Section Gray Light */
  color: var(--wp--preset--color--text) !important; /* your light gray #d4d4d4 */
  border-color: transparent !important;
}

/* Outline style button hover: softer gray background with light text */
:root body .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: #3c3c3c !important;
  color: var(--wp--preset--color--text) !important;
  border-color: #3c3c3c !important;
}

.hero-text {
  text-shadow: 0 0 0.5px rgba(255, 255, 255, 0.1);
  mix-blend-mode: lighten;
  opacity: 0.92; /* Just enough to ease the bite */
}

.series-description-block {
  font-size: var(--wp--preset--font-size--series-intro);
  color: var(--wp--preset--color--text);
  font-family: var(--wp--preset--font-family--ysabeau-office);
  line-height: 1.6;
  padding-left: 1.25rem;
  border-left: 3px solid var(--wp--preset--color--muted);
  margin-bottom: 2rem;
  opacity: 0.95;
}

.series-description-block p {
  margin: 0.5em 0;
}

.series-toc-listing .serieslist-box {
  background: var(--wp--preset--color--base);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 0.75rem rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.series-toc-listing .serieslist-content h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

a[target='_blank']::after {
  content: '';
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  vertical-align: middle;
  background-color: currentColor;

  /* SVG as mask for external icon */
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M14 3h7v7m0-7L10 14m-7 7h7v-7'/%3E%3C/svg%3E")
    no-repeat center;
  mask-size: contain;

  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M14 3h7v7m0-7L10 14m-7 7h7v-7'/%3E%3C/svg%3E")
    no-repeat center;
  -webkit-mask-size: contain;
}

.reddit-embed {
  filter: invert(1) hue-rotate(180deg);
}

pre,
code,
code.inline-code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 0.7em;
  padding: 0.3em 0.3em;
  padding: 0.3em 0.3em;
  background: rgba(100, 100, 100, 0.3);
  border-radius: 4px;
}

.enlighter-t-dracula .enlighter span {
  font-size: 1.1em !important;
}

.enlighter-default,
.enlighter-default * {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important; /* Firefox/Chromium on Android */
}

/* ---- Comments and References Styling ---- */
/* Style the References section for better horizontal readability */
.geekist-pingbacks-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
  align-items: center;
}

.geekist-pingbacks-inline a {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--wp--preset--color--base-2, rgba(0, 0, 0, 0.5));
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1.4;
  transition: all var(--ui-trns-fast, 150ms) var(--ui-trns-ease, ease);
  color: var(--wp--preset--color--contrast, rgba(255, 255, 255, 0.7));
  white-space: nowrap;
  font-style: normal;
}

.geekist-pingbacks-inline a:hover {
  background: var(--wp--preset--color--base-3, rgba(0, 0, 0, 0.3));
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style the comma separators to be less intrusive */
.geekist-pingbacks-inline {
  font-size: 1.25rem;
  color: var(--wp--preset--color--base, rgba(255, 255, 255, 0.4));
}

/* Better spacing for References heading */
.wp-block-post-content h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Responsive: stack on smaller screens */
@media (max-width: 768px) {
  .geekist-pingbacks-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .geekist-pingbacks-inline a {
    white-space: normal;
  }
}
