/*
Theme Name: Readymade
Theme URI: https://wordpress.com/themes/readymade/
Description: Clean, organized, and highly readable, this theme is perfect for showcasing your career and side projects on a single page. Inspired by the clarity and elegance of Read.cv, it highlights typography, whitespace, and straightforward navigation to showcase your work and experience effectively. It's ideal for designers, developers, and creatives seeking a digital presence that resembles a polished resume — but even stronger.
Version: 1.0.1
Author: Automattic
Author URI: https://automattic.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: readymade
*/

/* Progresive enhancement to reduce widows and orphans.
/* https://github.com/WordPress/gutenberg/issues/55190
*/

h4, h5, h6, blockquote, caption, figcaption {
    text-wrap: balance;
}
p {
    text-wrap: pretty;
}

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--secondary);
}

/* Font smoothing */
body {
    text-rendering: geometricprecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: .0625em !important;
	text-underline-offset: .15em;
}

/* Base positioning for both cases */
.arrow-link,
.arrow-link a {
  position: relative;
}

/* Arrow for links directly carrying the class */
.arrow-link::after {
  content: " ›";
  display: inline;
  position: relative; /* allow vertical adjustment */
  top: -1px; /* elevate arrow */
  white-space: nowrap;
  font-size: small;
  font-family: "Inter", sans-serif;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  pointer-events: none;
}

/* Arrow for links inside a wrapper with the class */
.arrow-link a::after {
  content: " ›";
  display: inline;
  position: relative; /* allow vertical adjustment */
  top: -1px; /* elevate arrow */
  white-space: nowrap;
  font-size: small;
  font-family: "Inter", sans-serif;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  pointer-events: none;
}

/* Show the arrow on hover/focus */
.arrow-link:hover::after,
.arrow-link:focus::after,
.arrow-link a:hover::after,
.arrow-link a:focus::after {
  opacity: 1;
}

/* Prevent double arrows: when the wrapper has the class, hide its own ::after */
.arrow-link:has(a)::after {
  content: none !important;
}

/* Keep post title anchors inline if needed */
.wp-block-post-title.arrow-link a {
  display: inline;
}

/* Optional: suppress arrow on specific items */
.arrow-link.no-arrow::after,
.arrow-link a.no-arrow::after,
.arrow-link.no-arrow a::after {
  content: none !important;
}

/* Adds underline links to titles inside Query Loops */
.wp-block-query .wp-block-post-title a {
  text-decoration: underline !important;
  text-decoration-thickness: .0625em !important;
  text-underline-offset: .15em !important;
}

/*
 * Dark Mode, front-end and editor
 */
@media (prefers-color-scheme: dark) {
  body.editor-styles-wrapper,
body {
    --wp--preset--color--background: var(--wp--preset--color--background-dark);
    --wp--preset--color--foreground: var(--wp--preset--color--foreground-dark);
    --wp--preset--color--accent: var(--wp--preset--color--accent-dark);
  }
}