/* The side menu on every page (markup from .claude/build_menu.py): photo, greeting and clock;
   Selected work with type filters; Experience; availability and links. Soft rounded rows, one
   line each. Position and the floating card come from css/filter.css. */
.menu {
    --ink: #161615;
    --muted: #6b6b66;
    --soft: #6b6b66; /* 4.5:1 or better on the page and card greys */
    --row: rgba(0, 0, 0, 0.035);
    --row-hover: rgba(0, 0, 0, 0.07);
    color: var(--ink);
    font-size: 13px;
    letter-spacing: -0.15px;
}

.menu-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 14px;
    container-type: inline-size;
}

/* Greeting and clock */
.menu-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu-hello { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.menu-avatar { position: relative; flex-shrink: 0; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background-color: #ececea; }
.menu-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.menu-avatar-home { position: absolute; inset: 0; display: grid; place-items: center; color: #2a2a28; opacity: 0; }
.menu-avatar-home .icon { width: 16px; height: 16px; }
.menu-hello-text { position: relative; display: block; min-width: 0; }
.menu-hello-hi { display: grid; line-height: 1.3; }
.menu-hello b { font-weight: 400; color: var(--ink); }
.menu-hello-hi b + span { color: var(--muted); }
/* "Back home" waits underneath; hovering the greeting swaps it in (js/site.js) */
.menu-hello-back { position: absolute; top: 0; bottom: 0; left: 0; display: flex; align-items: center; gap: 6px; color: var(--ink); white-space: nowrap; opacity: 0; }
.menu-hello-back .icon { width: 14px; height: 14px; }
.menu-top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.menu-clock { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Sections */
.menu-section { margin-top: 32px; }
.menu-heading { margin-bottom: 10px; font-size: 12px; font-weight: 400; color: var(--soft); letter-spacing: -0.1px; }

/* Filter chips: pills under the heading; a black pill slides to the chosen one (js/site.js) */
.menu .project-filter { flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.menu .project-filter button { padding: 5px 12px; border-radius: 200px; font-size: 12px; }
.menu .project-filter-pill { border-radius: 200px; }

/* Rows */
.menu-list { display: flex; flex-direction: column; gap: 4px; }
.menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: var(--row);
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}
a.menu-row:hover { background-color: var(--row-hover); }
a.menu-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.menu-row-name, .menu-row-meta, .menu-exp > span { overflow: hidden; text-overflow: ellipsis; }
.menu-row-meta { flex-shrink: 0; color: var(--muted); }
.menu-row.selected { background-color: var(--ink); color: #fff; }
.menu-row.selected .menu-row-meta { color: rgba(255, 255, 255, 0.72); }

/* Project rows: like the filter chips, a light pill slides to the hovered row and a black
   pill to the current project; on click the black pill slides to the clicked row before the
   page changes (js/site.js). Each row keeps its own soft track underneath. */
.menu-projects.has-pills { position: relative; isolation: isolate; }
.menu-projects.has-pills .menu-row { position: relative; background-color: transparent; }
.menu-projects.has-pills .menu-row::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    border-radius: inherit;
    background-color: var(--row);
}
.menu-projects.has-pills .menu-row.selected { color: var(--ink); }
.menu-projects.has-pills .menu-row.selected .menu-row-meta { color: var(--muted); }
.menu-projects.has-pills .menu-row.is-current { color: #fff; }
.menu-projects.has-pills .menu-row.is-current .menu-row-meta { color: rgba(255, 255, 255, 0.72); }
.menu-projects.has-pills .menu-row { transition: color 0.3s ease; }
.menu-projects.has-pills .menu-row .menu-row-meta { transition: color 0.3s ease; }
.menu-pill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    border-radius: 10px;
    pointer-events: none;
    will-change: transform;
}
.menu-pill-hover { z-index: -2; background-color: rgba(0, 0, 0, 0.065); opacity: 0; }
.menu-pill-current { z-index: -1; background-color: var(--ink); opacity: 0; }

/* Experience: company, role, years in three columns */
.menu-exp { display: grid; grid-template-columns: 8.6rem minmax(0, 1fr) auto; gap: 10px; }
.menu-exp-role { color: #4a4a46; }
.menu-exp-years { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

/* Short forms (Sr., Now, ONE) only where the menu is narrow */
.menu .sm { display: none; }
@container (max-width: 400px) {
    .menu .lg { display: none; }
    .menu .sm { display: inline; }
    .menu-exp { grid-template-columns: 5.9rem minmax(0, 1fr) auto; gap: 8px; font-size: 12.5px; letter-spacing: -0.2px; }
}

/* Footer: availability and links */
.menu-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: auto; padding-top: 28px; }
.menu .available { border-radius: 10px; padding: 8px 12px; }
.menu .available-text { font-size: 12.5px; }
/* Contact: the site's soft button, as the Learn more in the About Ryan card */
.menu-contact { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 9px; background-color: rgba(0, 0, 0, 0.05); color: #4a4a46; text-decoration: none; transition: background-color 0.3s ease, color 0.3s ease; }
.menu-contact .icon { width: 13px; height: 13px; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.menu-contact:hover, .menu-contact[aria-current] { background-color: rgba(0, 0, 0, 0.08); color: var(--ink); }
.menu-contact:hover .icon { transform: translateX(3px); }
.menu-contact:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.menu-links { display: flex; gap: 14px; }
.menu-links a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}
.menu-links a:hover { text-decoration-color: var(--ink); }
.menu-links .icon { width: 12px; height: 12px; }

/* The narrowest menus (phones): a touch smaller still, so every role fits on its line */
@container (max-width: 340px) {
    .menu-exp { grid-template-columns: 5.5rem minmax(0, 1fr) auto; font-size: 12px; }
    .menu .xs-hide { display: none; }
}

/* Shorter screens: rows and gaps tighten so the whole menu stays in view */
@media (min-width: 781px) and (max-height: 980px) {
    .menu-section { margin-top: 24px; }
    .menu-row { padding-top: 8px; padding-bottom: 8px; }
    .menu-list { gap: 3px; }
    .menu-footer { padding-top: 20px; }
}

@media (min-width: 781px) and (max-height: 840px) {
    .menu-section { margin-top: 18px; }
    .menu-heading { margin-bottom: 6px; }
    .menu .project-filter { margin-bottom: 8px; }
    .menu-row { padding-top: 6px; padding-bottom: 6px; }
    .menu-footer { padding-top: 14px; }
}

/* Phones: the case-study menu opens as a floating card (css/filter.css); the back chevron sits
   before the greeting */
@media (max-width: 780px) {
    .right-side-menu.menu.open { display: block; } /* older styles open it as a flex row */
    .menu-inner { padding: 14px 12px; }
    .menu-exp { padding-left: 12px; padding-right: 12px; }
    .menu-top .menu-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; }
    .menu-row { padding: 12px 14px; }
}

/* The hovered project is the focal point: the others dim slightly */
.menu-projects .menu-row > span,
.menu-projects.has-pills .menu-row::before { transition: opacity 0.3s ease, color 0.3s ease; }
.menu-projects:hover .menu-row:not(:hover) > span { opacity: 0.5; }
.menu-projects:hover .menu-row:not(:hover)::before { opacity: 0.6; }
@media (min-width: 781px) and (max-height: 760px) {
    .menu-row { padding-top: 5px; padding-bottom: 5px; }
    .menu-list { gap: 2px; }
    .menu-section { margin-top: 14px; }
}

/* Case studies: in place of Experience, a way into the About page. A dashed card that
   settles in after the menu, firms up on hover, and nudges its arrow. */
.menu-about-card {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 36px 28px;
    border: 1px dashed rgba(0, 0, 0, 0.14);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    text-decoration: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.menu-about-text { max-width: 30ch; line-height: 1.5; }
.menu-about-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 9px; background-color: rgba(0, 0, 0, 0.05); color: #4a4a46; transition: background-color 0.3s ease, color 0.3s ease; }
.menu-about-button .icon { width: 13px; height: 13px; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.menu-about-card:hover { border-color: rgba(0, 0, 0, 0.24); background-color: rgba(0, 0, 0, 0.015); }
.menu-about-card:hover .menu-about-button { background-color: rgba(0, 0, 0, 0.08); color: var(--ink); }
.menu-about-card:hover .icon { transform: translateX(3px); }
.menu-about-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Held until the menu cascades in (js/boot.js, js/site.js) */
html.menu-in .menu :is(.menu-top, .menu-heading, .project-filter, .menu-row, .menu-about-card, .menu-footer) { opacity: 0; }
