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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: -.02em;
    margin: 0;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: clamp(20px, 3vw, 32px);
}

.skeleton-placeholder {
    position: relative;
    overflow: hidden;
    background: var(--elevated);
}
.skeleton-placeholder img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.skeleton-placeholder img.loaded {
    opacity: 1;
}

/* ==========================================================================
   Reveal-on-scroll (used generically; see custom.js)
   ========================================================================== */
@keyframes hy-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
[data-hy-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
[data-hy-reveal].hy-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   On-load entrance animations (hero pill / heading / description / actions)
   ========================================================================== */
.hy-anim-fade-up {
    animation: hy-fade-up .7s cubic-bezier(.16,1,.3,1) var(--hy-delay, 0s) both;
}
@media (prefers-reduced-motion: reduce) {
    .hy-anim-fade-up {
        animation: none;
    }
}

/* ==========================================================================
   Header scroll-progress bar
   ========================================================================== */
.hy-progress-track {
    height: 2px;
    background: transparent;
}
.hy-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width .1s linear;
}

/* ==========================================================================
   Nav active (scroll-spy) state
   ========================================================================== */
.site-header__nav a.is-active:not(.hy-btn) {
    color: var(--primary);
    background: var(--tint);
}

/* ==========================================================================
   Eyebrow / section heading (shared by every content block)
   ========================================================================== */
.hy-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}

/* Resets specific [[bracket-marked]] words back to the default text color
   inside an otherwise fully-colored span — see hy_render_marked_text(). */
.hy-unhighlight {
    color: var(--text);
}

.hy-section-heading {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 62ch;
    margin-bottom: clamp(28px, 4vw, 44px);
}
.hy-section-heading__title {
    font-weight: 600;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.14;
}
.hy-section-heading__desc {
    margin: 0;
    color: var(--muted);
}
.hy-section-heading--split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: none;
}
.hy-section-heading--split > :first-child {
    max-width: 58ch;
}

.hy-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.hy-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .45s cubic-bezier(.16,1,.3,1);
}
.hy-btn--primary {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: var(--shadow-md);
}
.hy-btn--primary:hover {
    background: var(--primary-hover);
    color: var(--on-primary);
}
.hy-btn--ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.hy-btn--ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.hy-btn--small {
    padding: 9px 16px;
    font-size: 13.5px;
    border-radius: 10px;
}

.hy-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}
.hy-icon--flip {
    transform: scaleX(-1);
}

/* ==========================================================================
   Empty state (dynamic CPT-backed blocks with no content yet)
   ========================================================================== */
.hy-empty-state {
    padding: 28px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: var(--elevated);
}

/* ==========================================================================
   Star rating (testimonials)
   ========================================================================== */
.hy-stars {
    display: flex;
    gap: 3px;
    color: var(--border);
}
.hy-star {
    width: 15px;
    height: 15px;
}
.hy-star--filled {
    color: var(--primary);
}

/* ==========================================================================
   Cards (services / portfolio / posts grids)
   ========================================================================== */
.hy-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hy-grid--posts,
.hy-grid--portfolio {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
    .hy-grid--posts,
    .hy-grid--portfolio {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 520px) {
    .hy-grid--posts,
    .hy-grid--portfolio {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Reveal-on-scroll wrapper around a card (currently .hy-card--service): kept
   separate from .hy-card itself so its opacity/transform transition (see
   [data-hy-reveal] above) doesn't clash with — and delay — .hy-card's own
   hover transition, since both would otherwise fight over the same
   "transform" property on one element. */
.hy-card-reveal {
    height: 100%;
}
.hy-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .25s ease, box-shadow .3s ease;
    /* .hy-card--service is now an <a> directly (the whole box is clickable) —
       without this, the global "a { color: var(--primary) }" rule would
       inherit down into the title/excerpt text and tint them blue. */
    color: inherit;
    text-decoration: none;
}
.hy-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.hy-card__media {
    aspect-ratio: 16/10;
    background: var(--elevated);
    overflow: hidden;
}
.hy-card--portfolio .hy-card__media {
    aspect-ratio: 16/9;
}
.hy-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hy-card__media--empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hy-card__body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}
.hy-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--tint);
    color: var(--primary);
    display: grid;
    place-items: center;
}
.hy-card__icon .hy-icon {
    width: 20px;
    height: 20px;
}
.hy-card__title {
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: -.015em;
    line-height: 1.3em !important;
    display: block;
    margin: 0;
}
.hy-card__title a {
    color: inherit;
}
.hy-card__excerpt {
    margin: 0;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}
.hy-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}
.hy-card__link .hy-icon {
    transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.hy-card:hover .hy-card__link .hy-icon {
    transform: translateX(5px);
}

.hy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.hy-tag {
    align-self: flex-start;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hy-tag--accent {
    background: var(--tint);
    border-color: transparent;
    color: var(--primary);
}
.hy-archive__categories {
    margin-top: 16px;
}

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 45;
    border-bottom: 1px solid var(--border);
}
/*
 * The frosted-glass background lives on a pseudo-element rather than on
 * .site-header itself. backdrop-filter (like transform/filter) makes the
 * element it's applied to the containing block for any position: fixed
 * descendant — and the off-canvas nav drawer + its scrim are fixed-position
 * descendants of .site-header. With backdrop-filter directly on the header,
 * their "top/bottom: 0" resolved against the ~70px-tall header box instead
 * of the viewport, collapsing the drawer to a sliver. Isolating it here
 * keeps the visual effect without turning .site-header into that trap.
 */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--header);
    backdrop-filter: blur(14px);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 68px;
}
.site-header__logo img,
.site-header__logo .custom-logo {
    display: block;
    max-height: 40px;
    width: auto;
}
.site-header__logo a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}
.site-header__nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.site-header__nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
/*
 * :not(.hy-btn) matters here: .hy-drawer-cta (the "Hire me" link relocated
 * into the drawer) is also a plain <a> living inside .site-header__nav, so
 * without the exclusion these nav-link rules — at (0,1,1) specificity —
 * would beat .hy-btn--primary's own color/background (0,1,0), washing its
 * text out to --muted instead of --on-primary. Nav-link styling shouldn't
 * apply to something that's actually a full button component.
 */
.site-header__nav a:not(.hy-btn) {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--muted);
}
.site-header__nav a:not(.hy-btn):hover {
    color: var(--primary);
    background: var(--tint);
}
.site-header__nav a .hy-icon {
    /* Only shown inside the mobile drawer (see media query below) — the
       desktop horizontal nav stays a plain text link list. */
    display: none;
}
/*
 * These only ever appear inside the mobile off-canvas drawer. !important
 * here (and on their mobile-visible counterparts below) is deliberate: it's
 * a plain visibility toggle keyed to viewport width, not component styling,
 * and it must win regardless of any .hy-btn/.hy-icon-btn rules elsewhere in
 * this file — a plain cascade-order dependency here already broke once.
 */
.site-header__nav-brand,
.site-header__nav-group-label,
.site-header__nav-availability,
.site-header__nav-footer,
.hy-drawer-cta {
    display: none !important;
}
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hy-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}
.hy-icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Theme toggle: sun/moon crossfade + rotate */
[data-hy-theme-toggle] .icon-sun,
[data-hy-theme-toggle] .icon-moon {
    grid-area: 1 / 1;
    transition: opacity .4s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1);
}
[data-hy-theme-toggle] .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(.6);
}
[data-theme="dark"] [data-hy-theme-toggle] .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(.6);
}
[data-theme="dark"] [data-hy-theme-toggle] .icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Mobile menu toggle: hamburger/close crossfade */
.site-header__toggle .icon-menu,
.site-header__toggle .icon-close {
    grid-area: 1 / 1;
    transition: opacity .3s ease, transform .3s cubic-bezier(.16,1,.3,1);
}
.site-header__toggle .icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(.6);
}
.site-header__toggle[aria-expanded="true"] .icon-menu {
    opacity: 0;
    transform: rotate(90deg) scale(.6);
}
.site-header__toggle[aria-expanded="true"] .icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    [data-hy-theme-toggle] .icon-sun,
    [data-hy-theme-toggle] .icon-moon,
    .site-header__toggle .icon-menu,
    .site-header__toggle .icon-close {
        transition: none;
    }
}

.site-header__toggle {
    display: none;
    /* Sits last in markup, right after .site-header__actions, so it's the
       rightmost item in the header row. Once the nav becomes an off-canvas
       drawer (position: fixed) below, it's taken out of the flex flow —
       .site-header__actions carries the margin-left: auto that pushes the
       remaining in-flow items (itself + this toggle) to the right. */
}

@media (max-width: 900px) {
    .site-header__toggle {
        display: grid;
    }

    /* .site-header__nav becomes position: fixed below (out of flex flow),
       so its own margin-left: auto stops doing anything. .site-header__actions
       is now the first remaining in-flow item after the logo, so it picks up
       that job — pushing itself + the toggle button after it to the right. */
    .site-header__actions {
        margin-left: auto;
    }

    /* Off-canvas drawer: slides in from the left edge, below the header. */
    .site-header__nav {
        position: fixed;
        top: 70px;
        left: 0;
        bottom: 0;
        width: min(300px, 84vw);
        margin: 0;
        background: var(--surface);
        border-top: none;
        border-right: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 16px;
        gap: 2px;
        transform: translateX(-100%);
        pointer-events: none;
        transition: transform .34s cubic-bezier(.16,1,.3,1);
        overflow-y: auto;
        z-index: 60;
        box-shadow: var(--shadow-lg);
    }
    .site-header__nav.is-open {
        transform: translateX(0);
        pointer-events: auto;
    }

    /* Avatar badge + name + tagline */
    .site-header__nav-brand {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding-bottom: 18px;
        margin-bottom: 6px;
        border-bottom: 1px solid var(--border);
    }
    .site-header__nav-avatar {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        border-radius: 11px;
        background: var(--tint);
        color: var(--primary);
        display: grid;
        place-items: center;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 15px;
        letter-spacing: -.02em;
        border: 1px solid var(--border);
    }
    .site-header__nav-brand-text {
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }
    .site-header__nav-name {
        font-family: var(--font-heading);
        font-weight: 600;
        font-size: 15px;
        line-height: 1.3;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-header__nav-tagline {
        font-family: var(--font-mono);
        font-size: 10.5px;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--muted);
    }

    /* Group headings ("Overview" / "Work" / "Connect") */
    .site-header__nav-group-label {
        display: block !important;
        margin-top: 16px;
        padding: 0 10px 6px;
        font-family: var(--font-mono);
        font-size: 10px;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--muted);
    }
    .site-header__nav-group-label:first-of-type {
        margin-top: 4px;
    }

    .site-header__nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    .site-header__nav a:not(.hy-btn) {
        padding: 10px;
        border-radius: 10px;
    }
    .site-header__nav a .hy-icon {
        display: block;
        width: 17px;
        height: 17px;
        flex: 0 0 17px;
    }

    /* "Hire me" CTA, relocated here from the header row */
    .hy-drawer-cta {
        display: flex !important;
        justify-content: center;
        margin-top: 16px;
    }

    /* "Available for work" indicator */
    .site-header__nav-availability {
        display: flex !important;
        align-items: center;
        gap: 9px;
        margin-top: auto;
        padding: 18px 4px 0;
        font-family: var(--font-mono);
        font-size: 11px;
        letter-spacing: .04em;
        color: var(--muted);
        white-space: nowrap;
    }
    .site-header__nav-availability-dot {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
        border-radius: 50%;
        background: #22c55e;
        animation: hy-pulse 2.6s cubic-bezier(.16, 1, .3, 1) infinite;
    }

    /* Theme toggle + social icons row */
    .site-header__nav-footer {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin-top: 14px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }

    /* The header's own CTA moves into the drawer above instead, so the
       cramped mobile header row isn't fighting the logo for space. */
    .site-header__cta {
        display: none !important;
    }
}

@keyframes hy-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .site-header__nav-availability-dot {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header__nav {
        transition: none;
    }
}

/* Scrim behind the drawer — dims the page content, not the header itself. */
.hy-drawer-scrim {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: rgba(10, 11, 14, .45);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.hy-drawer-scrim.is-visible {
    opacity: 1;
    pointer-events: auto;
}
@media (min-width: 901px) {
    .hy-drawer-scrim {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hy-drawer-scrim {
        transition: none;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-header__cta {
    margin-left: 4px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.site-footer__brand {
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.site-footer__brand-logo img,
.site-footer__brand-logo .custom-logo {
    display: block;
    max-height: 34px;
    width: auto;
}
.site-footer__brand-logo a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
}
.site-footer__tagline {
    margin: 0;
    max-width: 48ch;
    color: var(--muted);
    font-size: 14.5px;
}
.site-footer__inner {
    padding-block: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-footer__brand + .site-footer__inner {
    border-top: 1px solid var(--border);
    margin-top: 24px;
}
.site-footer__text {
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--muted);
}
.site-footer__nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}
.site-footer__social {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   Archive / single templates (Portfolio, Service, standard posts)
   ========================================================================== */
.hy-archive {
    padding-block: clamp(48px, 6vw, 80px);
}
.hy-archive__pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}
.hy-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding-inline: 8px;
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
}
.hy-archive__pagination .page-numbers.current,
.hy-archive__pagination .page-numbers:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.hy-single__header {
    padding-block: clamp(40px, 6vw, 64px) 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hy-single__back {
    align-self: flex-start;
}
.hy-single__category {
    align-self: flex-start;
}
.hy-single__title {
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}
.hy-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 14.5px;
}
.hy-single__meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hy-single__thumbnail {
    aspect-ratio: 16/9;
    background: var(--elevated);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.hy-single__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   About page (page-about.php)
   ========================================================================== */
.hy-about-banner {
    padding-block: clamp(48px, 7vw, 80px) clamp(24px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hy-about-banner__title {
    font-weight: 600;
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    line-height: 1.12;
}
.hy-about-banner__subtitle {
    margin: 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

.hy-about-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(20px, 3vw, 28px) clamp(24px, 3vw, 32px);
    margin-block: clamp(24px, 4vw, 40px);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.hy-about-contact__socials {
    display: flex;
    gap: 8px;
}
.hy-about-contact__details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
}
.hy-about-contact__item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hy-about-contact__value {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text);
}
a.hy-about-contact__value:hover {
    color: var(--primary);
}

/* Shared two-column "titled list" shell, used by hy/certificates-skills
   and hy/education-languages so the grid layout isn't duplicated in both
   blocks' own style.scss — only their inner item markup differs. */
.hy-split-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}
@media (max-width: 780px) {
    .hy-split-columns {
        grid-template-columns: 1fr;
    }
}
.hy-split-columns__col-title {
    margin: 0 0 16px;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

/* Two-column body: the_content() + a tags/badges sidebar. Bottom padding
   is intentionally smaller than the top — it stacks with the CTA
   section's own top padding right after it. */
.hy-single__layout {
    padding-block: clamp(40px, 6vw, 64px) clamp(16px, 3vw, 32px);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}
@media (max-width: 780px) {
    .hy-single__layout {
        grid-template-columns: 1fr;
    }
}
.hy-single__main {
    max-width: 760px;
    line-height: 1.75;
}
.hy-single__main p,
.hy-single__main li {
    color: var(--muted);
}
.hy-single__main img {
    border-radius: 12px;
}
/* Anchor-jumping to a TOC entry would otherwise land the heading right at
   the very top of the viewport, hidden behind the sticky header. */
.hy-single__main h2,
.hy-single__main h3 {
    scroll-margin-top: 90px;
    margin-bottom: 0.6em;
}
.hy-single__main h2 {
    line-height: 1.2em;
    margin-top: 2em;
}
.wp-block-pullquote {
    padding: 2em 0;
}

/* Table of contents variant of the layout (single.php) — narrow TOC rail
   on the left instead of the wider portfolio sidebar on the right. */
.hy-single__layout--toc {
    grid-template-columns: minmax(220px, 260px) 1fr;
}
.hy-single__toc {
    position: sticky;
    top: 90px;
}
@media (max-width: 780px) {
    .hy-single__layout--toc {
        grid-template-columns: 1fr;
    }
    .hy-single__toc {
        position: static;
        top: auto;
    }
}
.hy-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hy-toc-list__item a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease;
}
.hy-toc-list__item a:hover {
    background: var(--tint);
    color: var(--primary);
}
.hy-toc-list__item--h3 a {
    padding-left: 20px;
    font-size: 13px;
}

.hy-single__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}
.hy-single__sidebar-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.hy-single__sidebar-title {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

/* "More Portfolio" — compact list in the sidebar, small thumbnail + title */
.hy-sidebar-related {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hy-sidebar-related__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-inline: -8px;
    border-radius: 12px;
    transition: background .2s ease;
}
.hy-sidebar-related__item:hover {
    background: var(--elevated);
}
.hy-sidebar-related__media {
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--elevated);
    border: 1px solid var(--border);
}
.hy-sidebar-related__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hy-sidebar-related__media--empty {
    display: grid;
    place-items: center;
}
.hy-sidebar-related__title {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

/* ==========================================================================
   404
   ========================================================================== */
.hy-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
}
.hy-404__inner {
    max-width: 600px;
    text-align: center;
    padding-block: 3rem;
}
.hy-404__code {
    font-family: var(--font-heading);
    font-size: 7rem;
    font-weight: 700;
    color: var(--border);
    letter-spacing: -.02em;
}
.hy-404__title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hy-404__message {
    color: var(--muted);
    margin-bottom: 2rem;
}
.hy-404__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   CTA panel — shared by the hy/cta block (homepage) and the Customizer-
   driven global CTA partial (parts/cta/main.php, shown on archive pages).
   Lives here rather than in the block's own stylesheet because classic PHP
   archive templates don't use the block and wouldn't otherwise load it.
   ========================================================================== */
.hy-cta {
    /* Top is intentionally much smaller than bottom: this section can
       follow bare the_content() output (page.php has no spacing rules of
       its own) with nothing to share the gap with, unlike the CPT single
       templates which already pad their own last section. */
    padding-block: clamp(24px, 3vw, 40px) clamp(48px, 6vw, 80px);
}
.hy-cta__panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    padding: clamp(36px, 6vw, 72px);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.hy-cta__glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 120%;
    background: radial-gradient(ellipse at center, var(--primary) 0%, transparent 65%);
    opacity: .14;
    filter: blur(60px);
    pointer-events: none;
}
.hy-cta__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.hy-cta__heading {
    margin: 0;
    max-width: 24ch;
    font-weight: 600;
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    line-height: 1.12;
}
.hy-cta__description {
    margin: 0;
    max-width: 52ch;
    color: var(--muted);
}
.hy-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
}
/* Below this width, side-by-side pill buttons leave a lot of dead space
   either side — full-width stacked buttons are easier to tap and read as
   a clear, deliberate choice instead of two floating islands. */
@media (max-width: 600px) {
    .hy-cta__actions {
        flex-direction: column;
    }
    .hy-cta__actions .hy-btn {
        width: 100%;
        justify-content: center;
    }
    /* Tighten the gap between the panel and the screen edge (rather than
       insetting the full-width button from the panel's own edge) — the
       panel sits wider as a result, and its own padding still keeps the
       button clear of its corners. */
    .hy-cta > .container {
        padding-inline: 12px;
    }
}
