/*

Theme Name: Severino Labs

Version: 3.0

Author: Joe Severino

Author URI: https://jseverino.com

Description: A personal portfolio and blog theme with security-focused modifications and UI enhancements.

*/

/* =========================
   Base
   ========================= */

/* Spacing variable fallbacks */
:root {
    --wp--custom--spacing--small:  var(--wp--preset--spacing--30,  clamp(1.5rem, 5vw, 2rem));
    --wp--custom--spacing--medium: var(--wp--preset--spacing--50,  clamp(2.5rem, 8vw, 4rem));
    --wp--custom--spacing--large:  var(--wp--preset--spacing--60,  clamp(2.5rem, 8vw, 6rem));
    --wp--custom--spacing--outer:  max(1.25rem, 4vw);
    --wp--preset--spacing--80:     min(8rem, 12vw);
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    -moz-osx-font-smoothing:  var(--wp--custom--typography--font-smoothing--moz, auto);
    -webkit-font-smoothing:   var(--wp--custom--typography--font-smoothing--webkit, auto);
}

a {
    text-decoration-style:     var(--wp--custom--elements--link--static--text-decoration-style, solid);
    text-decoration-thickness: var(--wp--custom--elements--link--text-decoration-thickness, 1px);
    text-underline-offset:     var(--wp--custom--elements--link--text-underline-offset, 0.25ch);
}

a:hover, a:focus {
    text-decoration-style: var(--wp--custom--elements--link--interactive--text-decoration-style, dashed);
}

a:active { text-decoration: none; }

:where(.wp-site-blocks *:focus) { outline-width: 1px; outline-style: solid; }

/* Footer top-margin reset */
footer.wp-block-template-part:not([style*="margin-top"]) { margin-top: 0; }

/* Image border-radius overflow fix */
.wp-block-image[style*="-radius"]:not([style*="overflow"]) { overflow: hidden; }

/* Button transition */
.wp-element-button { transition: background-color 0.15s ease; }

/* Table stripes */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: var(--wp--custom--blocks--core-table--variant-stripes--color--background, var(--wp--preset--color--tertiary));
}

/* Quote plain variation */
blockquote.is-style-plain { border: none; padding-left: 0; }

/* Inputs */
input, textarea { caret-color: inherit; outline-color: inherit; }

:where(.wp-block-post-comments-form) input:not([type=submit]),
:where(.wp-block-post-comments-form) textarea {
    background-color: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
    border-color: inherit;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html:focus-within { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
a, button, [role="button"],
.wp-block-navigation-item,
.wp-block-navigation-item__content,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.wp-block-site-title a,
.wp-block-post,
.wp-block-post-title { -webkit-tap-highlight-color: transparent; }

/* Remove browser focus ring when triggered by tap/mouse rather than keyboard */
.wp-block-navigation a:focus:not(:focus-visible),
.wp-block-site-title a:focus:not(:focus-visible),
.wp-block-post-title a:focus:not(:focus-visible),
.wp-block-navigation__responsive-container-open:focus:not(:focus-visible),
.wp-block-navigation__responsive-container-close:focus:not(:focus-visible) { outline: none; }

/* Restore underline for body content links — scoped to prose (p, li)
   so headings, card titles, and tech pills are unaffected            */
.wp-block-post-content p > a:not(.wp-block-button__link),
.wp-block-post-content li > a:not(.wp-block-button__link),
.wp-block-post-content p > a:not(.wp-block-button__link):hover,
.wp-block-post-content li > a:not(.wp-block-button__link):hover {
    text-decoration: underline;
}

/* Tech pills — no underline */
.tech-pills a,
.tech-pills a:hover {
    text-decoration: none;
}

/* Card title links — no underline, colour shift only */
.featured-projects .wp-block-post-title a {
    text-decoration: none;
    transition: color 0.15s ease;
}
.featured-projects .wp-block-post-title a:hover {
    color: var(--wp--preset--color--primary);
}

/* =========================
   Navigation
   ========================= */

.wp-block-navigation a {
    position: relative;
    text-decoration: none;
    letter-spacing: 0.03em;
    font-weight: var(--wp--custom--typography--font-weight--medium);
    transition: color 0.2s ease;
}

.wp-block-navigation a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--wp--preset--color--primary);
    transition: width 0.2s ease;
}

.wp-block-navigation a:hover {
    color: var(--wp--preset--color--primary);
}

.wp-block-navigation a:hover::after {
    width: 100%;
}

.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .current-menu-ancestor > a,
.wp-block-navigation .current-menu-parent > a,
.wp-block-navigation .current_page_item > a,
.wp-block-navigation .current_page_ancestor > a,
.wp-block-navigation .current_page_parent > a {
    color: var(--wp--preset--color--primary);
}

.wp-block-navigation .current-menu-item > a::after,
.wp-block-navigation .current-menu-ancestor > a::after,
.wp-block-navigation .current-menu-parent > a::after,
.wp-block-navigation .current_page_item > a::after,
.wp-block-navigation .current_page_ancestor > a::after,
.wp-block-navigation .current_page_parent > a::after {
    width: 100%;
}

/* =========================
   Design Tokens
   ========================= */

:root {
  --radius-sm:   10px;
  --radius-md:   12px;
  --radius-pill: 999px;
}

@media (max-width: 768px) {
  :root {
    --radius-md: 10px;
  }
}

.wp-block-heading { overflow-wrap: break-word; hyphens: auto; text-wrap: balance; } .wp-block-heading:lang(zh), .wp-block-heading:lang(ja), .wp-block-heading:lang(ko), .wp-block-heading:lang(th), .wp-block-heading:lang(lo), .wp-block-heading:lang(my), .wp-block-heading:lang(km), .wp-block-heading:lang(ar), .wp-block-heading:lang(ur) { word-break: keep-all; hyphens: manual; }
.pill {
  display: inline-flex; align-items: center; gap: .4em;
  padding: 6px 10px; border-radius: var(--radius-pill);
  background: var(--wp--preset--color--tertiary);
  color: var(--wp--preset--color--foreground);
  border: 1px solid rgba(0,0,0,0.07); font-size: 14px; font-weight: 600;
  line-height: 1;
}
.sticky-button {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 9999;
}

.site-sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* backdrop-filter lives on ::before to avoid a Safari bug where applying it
     directly to a sticky element blocks pointer events on all content below */
}

.site-sticky-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--wp--preset--color--background) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.site-sticky-header.scrolled::before {
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  background: color-mix(in srgb, var(--wp--preset--color--background) 85%, transparent);
}

/* ── Stable header height ──────────────────────────────────────────────────────
   Overriding --wp--preset--spacing--20 here cascades naturally into header.html's
   inline "padding: var(--wp--preset--spacing--20)" at every viewport width —
   no media query, no !important needed.                                        */
.site-sticky-header {
  --wp--preset--spacing--20: 0.65rem;
}

/* Desktop nav items get the same 2.5rem (40px) min-height as the hamburger
   so the header height is identical whether the nav or burger is showing.    */
@media (min-width: 600px) {
  .site-sticky-header .wp-block-navigation-item {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
  }
}

/* =========================
   Mobile Nav
   ========================= */

/* Prevent title shifting when nav overlay opens */
.site-sticky-header .wp-block-site-title,
.site-sticky-header .wp-block-site-logo { flex-shrink: 0; }

/* ── Hamburger + nav visibility: controlled entirely by mobile-nav.js ──────
   JS uses element.style.setProperty('display', value, 'important') which
   sets an inline !important declaration — specificity (1,0,0,0) — the
   highest possible in author origin. No CSS rule anywhere can override it.
   We intentionally leave no display rules here so JS owns this completely. ──*/

/* ── Hamburger button appearance (active whenever the button is visible) ── */
.wp-block-navigation__responsive-container-open {
  position: relative;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  color: var(--wp--preset--color--foreground);
  flex-shrink: 0;
}

.wp-block-navigation__responsive-container-open svg {
  display: none !important;
}

/* Three-bar icon via pseudo-elements */
.wp-block-navigation__responsive-container-open::before,
.wp-block-navigation__responsive-container-open::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.wp-block-navigation__responsive-container-open::before {
  transform: translateY(-6px);
  box-shadow: 0 6px 0 currentColor; /* middle bar */
}

.wp-block-navigation__responsive-container-open::after {
  transform: translateY(6px);
}

/* Menu open → morph to X */
.wp-block-navigation:has(.wp-block-navigation__responsive-container.is-menu-open)
.wp-block-navigation__responsive-container-open::before {
  transform: rotate(45deg);
  box-shadow: none;
}

.wp-block-navigation:has(.wp-block-navigation__responsive-container.is-menu-open)
.wp-block-navigation__responsive-container-open::after {
  transform: rotate(-45deg);
}

/* ── Close button: visually hidden but in flow so .click() fires reliably ── */
.wp-block-navigation__responsive-container-close {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Overlay: transparent shell; #sl-nav-backdrop (portal on <body>)
   provides the blur — backdrop-filter can't pierce the sticky header's
   stacking context, so it lives outside it entirely.                   ── */
.wp-block-navigation__responsive-container.is-menu-open {
  position: fixed !important;
  top: var(--sl-header-h, 4rem) !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important;
  height: auto !important;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.92) !important; /* no-JS fallback */
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  font-size: 1rem !important;
  animation: sl-overlay-in 0.22s ease both;
}

.sl-js-loaded .wp-block-navigation__responsive-container.is-menu-open {
  background: transparent !important;
}

/* ── Portal backdrop (appended to <body> by JS) ── */
#sl-nav-backdrop {
  position: fixed;
  top: var(--sl-header-h, 4rem);
  left: 0; right: 0; bottom: 0;
  z-index: 999; /* below header stacking context (1000) — blurs only page content */
  background: rgba(255, 255, 255, 0.72);
  background: color-mix(in srgb, var(--wp--preset--color--background) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: sl-overlay-in 0.22s ease both;
}

@keyframes sl-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Purple accent bar at the top of the open menu */
.wp-block-navigation__responsive-container.is-menu-open::before {
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
}

/* Dialog scrolls */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-dialog {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem var(--wp--preset--spacing--30) 2rem;
}

/* ── Nav items ── */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__container {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 1;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Stagger animation gated on JS running */
.sl-js-loaded .wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item {
  opacity: 0;
  transform: translateY(8px);
}

.sl-js-loaded .wp-block-navigation__responsive-container.is-menu-open.sl-nav-ready
.wp-block-navigation-item {
  opacity: 1;
  transform: none;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--wp--preset--color--foreground);
  line-height: 1.4;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item__label {
  font-size: inherit;
  line-height: inherit;
}

/* Suppress desktop hover underline inside overlay */
.wp-block-navigation__responsive-container.is-menu-open a::after {
  display: none;
}

/* Active item: purple underline only — text stays foreground colour */
.wp-block-navigation__responsive-container.is-menu-open
.current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open
.current-menu-item > a {
  color: var(--wp--preset--color--foreground);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--primary);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.post-badge {
    display: block;      /* forces new line */
    margin-top: 6px;     /* space under date */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    text-align: left;
    margin-left: 0;
    margin-right: auto;
    width: fit-content;  /* keeps pill tight */
}

/* colors */
.badge-mini-series {
    background: rgba(56, 29, 146, 0.08);
    color: var(--wp--preset--color--primary);
}

.badge-flagship {
    background: rgba(11, 6, 32, 0.07);
    color: var(--wp--preset--color--foreground);
}

/* mobile */
@media (max-width: 768px) {
    .post-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* =========================
   Featured Projects
   ========================= */

.featured-projects {
    max-width: 1100px;
    margin: 0 auto;
}

.featured-projects .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.featured-projects .wp-block-post {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--wp--preset--color--background);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--wp--preset--shadow--soft);
    gap: 10px;
    cursor: pointer;
}

/* Stretch the title link across the whole card so the browser treats
   the entire card as a real link, not just a JS click zone */
.featured-projects .wp-block-post-title a::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.featured-projects .wp-block-post a {
    display: inline;
    position: static;
}

/* Same image size */
.featured-projects .wp-block-post-featured-image {
    height: 180px;
    overflow: hidden;
}

.featured-projects .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Inner spacing */
.featured-projects .wp-block-post > *:not(.wp-block-post-featured-image) {
    padding-left: 14px;
    padding-right: 14px;
}

.featured-projects .wp-block-post > *:last-child {
    padding-bottom: 14px;
}

/* Title: force same height */
.featured-projects .wp-block-post-title {
    font-size: 1.0625rem;
    line-height: 1.3;
    font-weight: 600;
    margin: 0;

    min-height: 4.4em;

    display: flex;
    align-items: center;
}

/* Date: directly under title */
.featured-projects .wp-block-post-date {
    font-size: 12px;
    color: var(--wp--preset--color--muted);
    margin: 0;
}

/* Excerpt: same height too */
.featured-projects .wp-block-post-excerpt {
    font-size: 14px;
    color: var(--wp--preset--color--muted);
    line-height: 1.5;
    margin: 0;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;

    min-height: 6em;
}

/* Hover */
@media (hover: hover) and (pointer: fine) {
    .featured-projects .wp-block-post {
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .featured-projects .wp-block-post:hover {
        transform: translateY(-6px);
        box-shadow: var(--wp--preset--shadow--soft-lg);
    }
}


/* =========================
   Post Page (Single Post)
   ========================= */

/* Constrain overall content width */
.post-clean {
    max-width: 820px;
    margin: 0 auto;
}

/* Featured image */
.post-clean .wp-block-post-featured-image {
    margin-bottom: 20px;
}

.post-clean .wp-block-post-featured-image img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Title */
.post-clean .wp-block-post-title {
    margin-top: 10px;
    margin-bottom: 6px;
    line-height: 1.2;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* Date */
.post-clean .wp-block-post-date {
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--wp--preset--color--muted);
}

/* Body text */
.post-clean .wp-block-post-content {
    line-height: 1.65;
}

/* Images inside content */
.post-clean .wp-block-image img {
    border-radius: var(--radius-sm);
}

/* Spacing between sections */
.post-clean .wp-block-post-content > * {
    margin-bottom: 18px;
}

.hero-tight .wp-block-group {
    padding-top: 20px;
    padding-bottom: 20px;
}

.portfolio-link:active {
    transform: scale(0.95);
}

/* Technologies pills */
.tech-pills a {
    display: inline-block;
    padding: 6px 10px;
    margin: 4px 6px 4px 0;

    font-size: 12px;
    color: var(--wp--preset--color--foreground);
    text-decoration: none;

    background: rgba(0,0,0,0.04);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0,0,0,0.05);

    transition: background-color 0.15s ease, color 0.15s ease;
}

.tech-pills a:hover {
    background: rgba(0,0,0,0.08);
    color: var(--wp--preset--color--foreground);
}

.wp-block-button__link {
  box-shadow: var(--wp--preset--shadow--soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--wp--preset--shadow--soft-lg);
}

/* =========================
   Code Presentation System
   ========================= */

/* Inline code: .code-inline for generic code, .cli-inline for commands/filenames */
.code-inline,
.cli-inline {
    display: inline-block;
    padding: 0.1em 0.42em;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

/* Terminal commands and terminal output */
.cli-block {
    margin: 1.5rem 0;
    padding: 0 1.1rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-md);
    background: #020617;
    color: #d1d5db;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    overflow-x: auto;
    white-space: pre;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.cli-block::before {
    content: "Terminal";
    display: block;
    margin: 0 -1.1rem 0.85rem;
    padding: 0.55rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: #111827;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cli-prompt {
    color: #60a5fa;
    font-weight: 700;
}

.cli-command {
    color: #f8fafc;
}

.cli-success {
    color: #86efac;
    font-weight: 700;
}

.cli-warning {
    color: #fde68a;
    font-weight: 700;
}

.cli-error {
    color: #fca5a5;
    font-weight: 700;
}

/* Editable source code snippets: PHP, CSS, JS, Bash, config, etc. */
.source-code-block {
    margin: 1.5rem 0;
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: var(--radius-md);
    background: #f8fafc;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.source-code-block code {
    font: inherit;
    color: inherit;
    background: transparent;
    padding: 0;
    border: 0;
}

/* Mobile tuning */
@media (max-width: 768px) {
    .cli-block,
    .source-code-block {
        font-size: 0.82rem;
        line-height: 1.55;
    }

    .code-inline,
    .cli-inline {
        font-size: 0.84em;
    }
}

/* Automatic inline code styling */
p code,
li code,
figcaption code,

.wp-block-heading code {
    display: inline-block;
    padding: 0.1em 0.42em;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

/* =========================
   Portfolio Archive Pagination
   ========================= */

.featured-projects .wp-block-query-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;

    max-width: 1100px;
    margin: 2.75rem auto 0;
    padding: 0 1rem;

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
}

.featured-projects .wp-block-query-pagination-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

/* Shared pagination pill/button style */
.featured-projects .wp-block-query-pagination a,
.featured-projects .wp-block-query-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;

    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.035);
    color: var(--wp--preset--color--foreground);

    text-decoration: none;
    line-height: 1;
    box-shadow: var(--wp--preset--shadow--soft);

    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        color 0.15s ease;
}

.featured-projects .wp-block-query-pagination a:hover,
.featured-projects .wp-block-query-pagination .page-numbers:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.065);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--wp--preset--color--primary);
    box-shadow: var(--wp--preset--shadow--soft-lg);
}

/* Current page */
.featured-projects .wp-block-query-pagination .current {
    background: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    color: #fff;
    box-shadow: var(--wp--preset--shadow--soft);
}

/* Previous / next buttons */
.featured-projects .wp-block-query-pagination-previous,
.featured-projects .wp-block-query-pagination-next {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 2.75rem !important;
    height: 2.75rem !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    padding: 0 !important;

    line-height: 1 !important;
    font-size: 1.05rem;
}

/* Prevent theme/nav underline effects from touching pagination links */
.featured-projects .wp-block-query-pagination a::after,
.featured-projects .wp-block-query-pagination-previous::after,
.featured-projects .wp-block-query-pagination-next::after {
    display: none !important;
}

/* Keep visited pagination links visually consistent */
.featured-projects .wp-block-query-pagination a:visited {
    color: var(--wp--preset--color--foreground);
}

.featured-projects .wp-block-query-pagination .current:visited {
    color: #fff;
}

@media (max-width: 600px) {
    .featured-projects .wp-block-query-pagination {
        gap: 0.5rem;
        margin-top: 2.25rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .featured-projects .wp-block-query-pagination-numbers {
        gap: 0.45rem;
    }

    .featured-projects .wp-block-query-pagination a,
    .featured-projects .wp-block-query-pagination .page-numbers,
    .featured-projects .wp-block-query-pagination-previous,
    .featured-projects .wp-block-query-pagination-next {
        width: 2.4rem !important;
        height: 2.4rem !important;
        min-width: 2.4rem !important;
        min-height: 2.4rem !important;
    }
}

/* Force next arrow to be perfectly centered */

.featured-projects .wp-block-query-pagination-next {
    position: relative !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
    line-height: 1 !important;
}

.featured-projects .wp-block-query-pagination-next::before {
    content: "→";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    transform: translateY(-0.02em);
}

.featured-projects .wp-block-query-pagination-next::after {
    display: none !important;
}
