/* Recent News child pages only. Site branding and global navigation keep their own styles. */
body.amf-recent-news {
    --news-surface: color-mix(in srgb, var(--amf-bg-1) 35%, transparent);
    --news-text: var(--amf-text);
    --news-muted: var(--amf-muted);
    --news-accent: color-mix(in srgb, var(--amf-accent) 70%, var(--amf-text));
    --news-line: color-mix(in srgb, var(--amf-muted) 28%, transparent);
    --news-soft: color-mix(in srgb, var(--amf-accent) 8%, transparent);
}
body.amf-recent-news main {
    background: transparent;
    color: var(--news-text);
    padding-block: 18px 48px !important;
    margin-block-start: 0;
}
body.amf-recent-news main .wp-block-inner-page-title { display: none; }
body.amf-recent-news main > .wp-block-inner-page-title + .wp-block-group:not(:has(*)) { display: none; }
body.amf-recent-news .wp-block-post-content { padding-inline: 0; margin-block-start: 0 !important; }
body.amf-recent-news .wp-block-post-content > .amf-news-page {
    width: calc(100% - 64px);
    max-width: 1280px !important;
    margin: 0 auto;
}
.amf-news-page,
.amf-news-page * { box-sizing: border-box; }
.amf-news-page {
    color: var(--news-text);
    font-family: var(--wp--preset--font-family--poppins, system-ui, sans-serif);
    font-size: 16px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.amf-news-page :is(h1, h2, h3, p, figure, dl, dt, dd) { margin: 0; }
.amf-news-page :is(h1, h2, h3) {
    font-family: inherit;
    font-weight: 600;
    font-style: normal;
    color: var(--news-text);
    text-transform: none;
}
.amf-news-page a { color: var(--news-muted); text-decoration: none; }
.amf-news-page a:hover { color: var(--news-text); }
.amf-news-page a:focus-visible {
    outline: 2px solid var(--news-accent);
    outline-offset: 4px;
    border-radius: 2px;
}
.amf-news-page h1:focus-visible {
    outline: 2px solid var(--news-accent);
    outline-offset: 4px;
}
.amf-news-page h1[data-amf-pointer-focus]:focus { outline: none; }
.amf-news-page-nav {
    display: flex;
    flex-wrap: nowrap;
    width: fit-content;
    margin-inline: auto;
    padding: 5px;
    gap: 4px;
    border: 1px solid var(--news-line);
    border-radius: 999px;
    background: var(--news-soft);
}
.amf-news-page-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    padding: 7px 18px;
    font-size: 13px;
    border-radius: 999px;
}
body.amf-recent-news .amf-news-page-nav a[aria-current="page"] {
    /* Touch browsers retain the global hover color after a tap. */
    color: var(--amf-bg-1) !important;
    background: var(--news-accent);
    font-weight: 600;
}
.amf-news-experience-placeholder {
    min-height: 160px;
    margin-block-start: 20px;
    padding: 24px;
    border: 1px dashed var(--news-line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--news-soft);
    color: var(--news-muted);
    text-align: center;
    font-size: 14px;
}
.amf-news-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); }
.amf-news-sidebar { border-inline-end: 1px solid var(--news-line); padding: 44px 22px 0 0; }
.amf-news-section-nav { position: sticky; top: 32px; }
.amf-news-section-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-inline-start: 2px solid transparent;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    line-height: 1.55;
    letter-spacing: .09em;
    text-transform: uppercase;
    gap: 10px;
}
.amf-news-section-nav a[aria-current="location"] {
    border-color: var(--news-accent);
    color: var(--news-accent);
    background: linear-gradient(90deg, var(--news-soft), transparent);
}
.amf-news-content { min-width: 0; padding: 40px 0 0 40px; }
.amf-news-section { scroll-margin-top: 36px; }
.amf-news-eyebrow, .amf-news-kicker {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: var(--news-accent);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 11px;
    line-height: 1.6;
}
.amf-news-page h1 {
    font-size: clamp(38px, 4.8vw, 66px);
    letter-spacing: -.045em;
    line-height: 1.1;
    margin-block: 14px 10px;
}
.amf-news-subtitle { font-size: 17px; color: var(--news-muted); font-style: italic; }
.amf-news-overview::after {
    content: '';
    display: block;
    width: 38px;
    height: 2px;
    margin-block: 26px 0;
    background: linear-gradient(90deg, var(--news-accent), var(--amf-accent-3));
}
.amf-news-intro { padding-block: 28px 34px; max-width: 900px; color: var(--news-muted); }
.amf-news-intro p + p { margin-block-start: 14px; }
.amf-news-chapter {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 18px;
    border-block-start: 1px solid var(--news-line);
    padding-block: 28px;
}
.amf-news-number { color: var(--news-accent); font-size: 28px; line-height: 1.2; font-weight: 300; letter-spacing: -.06em; }
.amf-news-page h2 { font-size: clamp(21px, 2.1vw, 28px); line-height: 1.35; letter-spacing: -.025em; }
.amf-news-chapter-body { min-width: 0; }
.amf-news-media-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.amf-news-media-copy { min-width: 0; overflow-wrap: break-word; }
.amf-news-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #070a12;
    object-fit: contain;
    border: 1px solid var(--news-line);
    border-radius: 3px;
    color-scheme: dark;
}
.amf-news-media-copy .amf-news-kicker { margin-block: 2px 12px; }
.amf-news-media-copy p:not(.amf-news-kicker) { color: var(--news-muted); margin-block-start: 18px; font-size: 14px; line-height: 1.8; }
.amf-news-media-copy h2::after { content: ''; display: block; width: 32px; height: 2px; margin-block-start: 18px; background: var(--news-accent); }
.amf-news-details { margin-block-start: 24px !important; }
.amf-news-details > div { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 24px; padding-block: 18px; border-block-end: 1px solid var(--news-line); }
.amf-news-details > div:first-child { border-block-start: 1px solid var(--news-line); }
.amf-news-details dt { color: var(--news-muted); font-size: 13px; }
.amf-news-details dd { color: var(--news-text); font-size: 16px; }
.amf-news-album { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-block-start: 24px; }
.amf-news-photo-slot { min-width: 0; }
.amf-news-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--news-line);
    background: linear-gradient(145deg, var(--news-soft), transparent), var(--news-surface);
    color: var(--news-muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    letter-spacing: .025em;
}
body.amf-recent-news .amf-news-page .amf-news-photo-slot figcaption { margin-block-start: 10px; color: var(--news-muted); font-size: 13px; }
.amf-news-footer { border-block-start: 1px solid var(--news-line); padding-block: 20px 8px; }
.amf-news-back { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 13px; color: var(--news-accent) !important; }
.amf-news-back svg { width: 14px; height: 14px; flex: none; }
@media (max-width: 1023px) {
    .amf-news-layout { grid-template-columns: minmax(0, 1fr); }
    .amf-news-sidebar { padding: 14px 0; border-inline-end: 0; border-block-end: 1px solid var(--news-line); }
    .amf-news-section-nav { position: static; display: flex; flex-wrap: wrap; gap: 2px 12px; }
    .amf-news-section-nav a { min-height: 44px; padding: 8px 10px; }
    .amf-news-content { padding: 32px 0 0; }
}
@media (max-width: 767px) {
    body.amf-recent-news main { padding-block: 8px 24px !important; }
    /* The theme already provides the mobile page gutters. */
    body.amf-recent-news .wp-block-post-content > .amf-news-page { width: 100%; }
    .amf-news-page { font-size: 15px; }
    .amf-news-page-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; }
    .amf-news-page-nav:has(a[href="/personal-archive/unique-experiences/"]) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 20px;
    }
    .amf-news-page-nav a {
        justify-content: center;
        min-width: 0;
        min-height: 40px;
        padding: 6px 4px;
        font-size: 12px;
        line-height: 1.4;
        text-align: center;
        overflow-wrap: normal;
    }
    .amf-news-section-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    .amf-news-section-nav a { min-width: 0; padding: 8px; font-size: 10px; letter-spacing: .04em; }
    .amf-news-subtitle { font-size: 15px; }
    .amf-news-intro { padding-block: 24px 28px; }
    .amf-news-chapter { grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-block: 24px; }
    .amf-news-number { font-size: 23px; }
    .amf-news-media-row, .amf-news-album { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .amf-news-media-copy .amf-news-kicker { margin-block-start: 0; }
    .amf-news-details > div { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
    html:has(body.amf-recent-news) { scroll-behavior: smooth; }
    .amf-news-page a { transition: color .15s ease, background-color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
    html:has(body.amf-recent-news) { scroll-behavior: auto !important; }
    .amf-news-page *, .amf-news-page *::before, .amf-news-page *::after { animation: none !important; transition: none !important; }
}

/* Offer Received — letter archive cards */
.amf-news-chapter.amf-news-chapter--nonum { grid-template-columns: minmax(0, 1fr); }
.amf-news-chapter--nonum .amf-news-kicker { margin-block-end: 6px; }
.amf-news-chapter--nonum h2 { margin-block-end: 12px; }
.lt-cards { display: flex; flex-wrap: wrap; gap: 14px; margin-block-start: 10px; }
#the-letters .lt-cards + h3 { margin-block: 48px 24px; }
#the-letters .lt-cards + h3 + .lt-cards { margin-block-start: 0; }
.lt-card {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px 12px 12px;
    border: 1px solid var(--news-line);
    border-radius: 12px;
    background: var(--news-soft);
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .lt-card:hover {
        transform: translateY(-2px);
        border-color: var(--news-text);
        background: color-mix(in srgb, var(--news-soft) 80%, white 20%);
    }
}
.lt-card:focus-visible { outline: 2px solid var(--news-text); outline-offset: 3px; }
.lt-card img, .lt-thumb { width: 56px; height: 72px; flex: none; border-radius: 6px; }
.lt-card img { object-fit: cover; opacity: .85; }
/* Experience photos retain their complete framing and reuse the archive viewer. */
.lt-card.amf-experience-photo { display: block; width: 75%; margin-block-start: 20px; padding: 0; overflow: hidden; }
.lt-card.amf-experience-photo img { display: block; width: 100%; height: auto; object-fit: contain; opacity: 1; border-radius: 0; }
.amf-news-video.amf-experience-video { width: 75%; max-width: 480px; margin-block-start: 20px; aspect-ratio: 480 / 264; border-radius: 12px; }
.lt-thumb {
    border: 1px solid var(--news-line);
    opacity: .8;
    background:
        repeating-linear-gradient(to bottom, transparent 0 9px, var(--news-line) 9px 10px),
        linear-gradient(160deg, var(--news-surface), var(--news-soft));
}
.lt-card-meta { display: flex; flex-direction: column; gap: 2px; }
.lt-card-name { font-size: 13px; color: var(--news-text); font-weight: 600; letter-spacing: .02em; }
.lt-card-sub { font-size: 11px; color: var(--news-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.lt-viewer {
    padding: 0;
    border: 1px solid var(--news-line);
    border-radius: 12px;
    background: var(--news-surface, #111);
    max-width: min(92vw, 900px);
    min-width: min(320px, calc(92vw - 2px));
    min-height: 128px;
}
.lt-viewer::backdrop { background: rgba(5, 8, 18, .72); }
.lt-viewer-img { display: block; max-width: min(calc(92vw - 2px), 898px); max-height: 84vh; object-fit: contain; margin-inline: auto; }
.lt-viewer-img[data-loading] { opacity: 0; }
.lt-viewer-img[hidden] { display: none; }
.lt-viewer-img.is-ready { animation: lt-photo-in 220ms ease-out both; }
.lt-viewer[open]::backdrop { animation: lt-photo-in 220ms ease-out both; }
.lt-viewer-status { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; margin: 0; color: var(--news-text); pointer-events: none; }
.lt-viewer-status[hidden] { display: none; }
@keyframes lt-photo-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .lt-card { transition: none; }
    .lt-card:hover { transform: none; }
    .lt-viewer-img.is-ready, .lt-viewer[open]::backdrop { animation: none; }
}
.lt-viewer-close {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--news-line);
    border-radius: 50%;
    background: var(--news-soft);
    color: var(--news-text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
@media (max-width: 640px) {
    #the-letters .lt-cards + h3 { margin-block-start: 32px; }
    .lt-cards { flex-direction: column; }
    .lt-card { width: 100%; }
}

/* Internship — Gaussian splatting viewer */
.amf-gs-viewer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 60%, #16233c 0%, #070a12 70%);
}
.amf-gs-viewer .amf-gs-hint {
    position: absolute;
    inset-inline: 0;
    bottom: 12px;
    text-align: center;
    color: rgba(255, 255, 255, .55);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 2;
}
.amf-gs-viewer.is-loading::after {
    content: 'Loading 3D model…';
    position: absolute;
    inset-inline: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: rgba(255, 255, 255, .55);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    letter-spacing: .1em;
}
.amf-gs-viewer.is-error::after {
    content: 'The 3D model could not be loaded.';
    position: absolute;
    inset-inline: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
}
.amf-gs-viewer canvas { display: block; }

/* Internship: replacement videos and single, explicitly loaded model viewport. */
.amf-internship-videos { display: grid; gap: 28px; margin-block-start: 24px; }
.amf-internship-video { margin: 0; min-width: 0; }
.amf-internship-video figcaption { margin-block-end: 10px; color: var(--news-text); font-weight: 600; }
.amf-gs-gallery { margin-block-start: 24px; }
.amf-gs-options { display: flex; flex-wrap: wrap; gap: 10px; }
.amf-gs-options button { font: inherit; color: var(--news-text); background: var(--news-soft); border: 1px solid var(--news-line); border-radius: 8px; padding: 10px 18px; cursor: pointer; }
.amf-gs-options button[aria-pressed="true"] { border-color: var(--news-accent); background: color-mix(in srgb, var(--news-soft), var(--news-accent) 18%); }
.amf-gs-options button:focus-visible { outline: 2px solid var(--news-accent); outline-offset: 3px; }
.amf-gs-status { color: var(--news-muted); font-size: 13px; margin-block: 12px !important; min-height: 1.6em; }
.amf-gs-viewport { position: relative; width: 100%; height: clamp(280px, 48vw, 520px); overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #16233c, #070a12); border: 1px solid var(--news-line); border-radius: 8px; }
.amf-gs-mount { position: absolute; inset: 0; }
.amf-gs-viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* Dexterous Hand: one video per view, with native horizontal swipe. */
.amf-video-carousel { min-width: 0; }
.amf-video-carousel-track {
    position: relative;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.amf-video-carousel-track::-webkit-scrollbar { display: none; }
.amf-video-carousel-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
/* Native time labels must stay on one line while Chrome fits moving slides. */
.amf-video-carousel .amf-news-video { white-space: nowrap; }
.amf-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 10px;
    border: 1px solid var(--news-line);
    border-radius: 3px;
    background: linear-gradient(145deg, var(--news-soft), transparent), var(--news-surface);
    color: var(--news-muted);
    font-size: 14px;
}
.amf-video-placeholder > svg { width: 32px; height: 32px; opacity: .65; }
.amf-video-carousel-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: min(100%, 448px);
    margin: 12px auto 0;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--news-accent) 62%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--amf-bg-1) 70%, transparent);
}
.amf-video-carousel-controls[hidden] { display: none; }
.amf-video-carousel-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--news-line);
    border-radius: 50%;
    background: var(--news-soft);
    color: var(--news-text);
    cursor: pointer;
}
.amf-video-carousel-controls [data-carousel-direction] {
    display: grid;
    grid-template-columns: 24px 72px;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--news-accent) 16%, transparent);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}
.amf-video-carousel-controls [data-carousel-direction="1"] { grid-template-columns: 72px 24px; }
.amf-video-carousel-label { display: block; width: 72px; text-align: center; }
.amf-video-carousel-controls [data-carousel-direction]:not(:disabled):hover {
    background: color-mix(in srgb, var(--news-accent) 30%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--news-accent) 10%, transparent);
}
.amf-video-carousel-controls [data-carousel-direction]:not(:disabled):active { background: color-mix(in srgb, var(--news-accent) 40%, transparent); }
.amf-video-carousel-controls button:disabled { opacity: .45; cursor: default; background: transparent; }
.amf-video-carousel-controls button > svg { width: 24px; height: 24px; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.amf-video-carousel-controls [data-carousel-direction="1"] > svg { transform: rotate(180deg); }
.amf-video-carousel-dots { display: flex; justify-content: center; }
.amf-video-carousel-dots button { border: 0; background: transparent; }
.amf-video-carousel-dots button > span { width: 7px; height: 7px; border-radius: 50%; background: var(--news-muted); opacity: .45; }
.amf-video-carousel-dots button[aria-current="true"] > span { background: var(--news-accent); opacity: 1; }
.amf-video-carousel-track:focus-visible,
.amf-video-carousel-controls button:focus-visible { outline: 2px solid var(--news-accent); outline-offset: 3px; }
@media (max-width: 640px) {
    .amf-video-carousel-controls { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 0; padding: 2px; }
    .amf-video-carousel-controls [data-carousel-direction] { grid-template-columns: 24px; height: 44px; gap: 0; }
    .amf-video-carousel-label { display: none; }
}
