/* styles-new.css — redesigned homepage (scroll-driven). Loaded only by index-new.html. */

:root {
    /* Ohio State scarlet and gray on charcoal and warm paper. */
    --ink: #1B1B1B;          /* charcoal: dark bands, topbar, spine */
    --ink-2: #2E2E2E;
    --paper: #F5F3EF;        /* warm-neutral paper */
    --paper-2: #ECE9E3;
    --gray: #666666;         /* OSU gray: secondary text, labels (5.2:1 on paper) */
    --line: #D3CFC8;
    --scarlet: #BB0000;      /* OSU scarlet: bars, dots, borders, buttons, links on paper */
    --scarlet-deep: #8F0000;
    --scarlet-tint: #F3837A; /* scarlet as small text on charcoal only (~6.9:1 on --ink) */
    --white: #FFFFFF;
    --link: var(--scarlet);

    --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
    --sans: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;

    --rail-w: 72px;
    --gutter: clamp(20px, 5vw, 72px);
    --measure: 66ch;

    --ease-wipe: cubic-bezier(0.645, 0.045, 0.355, 1);
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.012em;
    margin: 0 0 0.5em;
    color: inherit;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 1.0; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.15rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.25em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 700; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--scarlet);
    outline-offset: 3px;
    border-radius: 2px;
}

.measure { max-width: var(--measure); }
.lead { font-size: 1.2rem; line-height: 1.55; }

/* ---------- Skip link / progress / topbar ---------- */

.skip-link {
    position: absolute; top: -60px; left: 12px;
    background: var(--ink); color: var(--white);
    padding: 10px 14px; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    z-index: 60; background: transparent; pointer-events: none;
}
.progress span {
    display: block; height: 100%; width: 100%;
    background: var(--scarlet);
    transform-origin: 0 50%;
    transform: scaleX(var(--scroll, 0));
}

.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px var(--gutter);
    background: rgba(27, 27, 27, 0.92);
    color: var(--white);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-name {
    font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
    color: var(--white); text-decoration: none; white-space: nowrap;
}
.topbar-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 899px) {
    /* Small screens: the bar scrolls away with the page; links sit in a single wrapped row. */
    .topbar { position: static; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 14px; padding-bottom: 12px; }
    .topbar-nav ul { justify-content: flex-start; gap: 2px 14px; }
    .topbar-nav a { font-size: 0.9rem; }
}
.topbar-nav li { margin: 0; }
.topbar-nav a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.topbar-nav a:hover, .topbar-nav a[aria-current="true"] { color: var(--white); border-bottom-color: var(--scarlet); }
.topbar-nav .nav-book a { color: var(--scarlet-tint); }
.topbar-nav .nav-book a:hover { color: var(--white); }

/* ---------- Left rail (section indicator) ---------- */

.rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w);
    display: none; z-index: 40;
    align-items: center; justify-content: flex-start; padding-left: 26px;
}
.rail ol {
    list-style: none; margin: 0; padding: 0;
    position: relative; display: flex; flex-direction: column; gap: 26px;
}
.rail ol::before {
    content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px;
    background: var(--line);
}
.rail li { margin: 0; }
.rail a {
    position: relative; display: flex; align-items: center; gap: 12px;
    color: var(--gray); text-decoration: none; font-size: 0.78rem; line-height: 1; white-space: nowrap;
}
.rail a::before {
    content: ""; width: 11px; height: 11px; border-radius: 50%;
    background: var(--paper); border: 1px solid var(--line);
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.rail a span { opacity: 0; transform: translateX(-4px); transition: opacity 0.25s, transform 0.25s; }
.rail a:hover span, .rail a:focus-visible span, .rail a[aria-current="true"] span { opacity: 1; transform: none; }
.rail a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.rail a[aria-current="true"]::before { background: var(--scarlet); border-color: var(--scarlet); transform: scale(1.25); }
.rail.on-dark a { color: rgba(255,255,255,0.65); }
.rail.on-dark a[aria-current="true"] { color: var(--white); }
.rail.on-dark a::before { background: var(--ink); border-color: rgba(255,255,255,0.3); }
.rail.on-dark a[aria-current="true"]::before { background: var(--scarlet); border-color: var(--scarlet); }
.rail.on-dark ol::before { background: rgba(255,255,255,0.2); }

@media (min-width: 1100px) {
    .rail { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: calc(100svh - 58px);
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(48px, 8vw, 110px) var(--gutter) clamp(72px, 10vw, 140px);
    background: var(--ink);
    color: var(--white);
    overflow: hidden;
}
.hero::after {
    /* a faint horizon line: the "night shift" cue, kept quiet */
    content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(36px, 5vw, 70px);
    height: 1px; background: linear-gradient(90deg, var(--scarlet), rgba(187,0,0,0) 70%);
}
.hero-inner {
    display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center;
    max-width: 1240px; margin: 0 auto; width: 100%;
}
.hero-lede {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.55;
    max-width: 44ch; color: rgba(255,255,255,0.86);
    margin-top: 1.5rem;
}
.hero-lede em { font-family: var(--serif); font-style: italic; color: var(--scarlet); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.hero-photo { margin: 0; justify-self: start; }
.headshot {
    width: clamp(160px, 24vw, 300px); height: clamp(160px, 24vw, 300px);
    border-radius: 50%; object-fit: cover;
    box-shadow: 0 0 0 6px var(--ink), 0 0 0 8px var(--scarlet);
}
.hero-scroll {
    position: absolute; right: var(--gutter); bottom: clamp(36px, 5vw, 70px);
    width: 22px; height: 38px; border: 1px solid rgba(255,255,255,0.5); border-radius: 12px;
    display: none; transform: translateY(-50%);
}
.hero-scroll span {
    position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px;
    background: var(--scarlet); border-radius: 2px;
    animation: hero-scroll 1.8s ease-in-out infinite;
}
@keyframes hero-scroll { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0.2; } }

@media (min-width: 760px) {
    .hero-inner { grid-template-columns: 1.6fr 1fr; }
    .hero-photo { justify-self: end; }
    .hero-scroll { display: block; }
}
@media (min-width: 1100px) {
    .hero { padding-left: calc(var(--rail-w) + var(--gutter)); }
}

/* ---------- Bands and split layout ---------- */

.band {
    padding: clamp(56px, 8vw, 120px) var(--gutter);
    border-top: 1px solid var(--line);
}
.band-tint { background: var(--paper-2); }
.band-dark { background: var(--ink); color: var(--white); border-top-color: var(--ink); }
.band-dark a { color: var(--scarlet-tint); }
.band-dark a:hover { color: var(--white); }

.split {
    display: grid; grid-template-columns: 1fr; gap: 24px 56px;
    max-width: 1240px; margin: 0 auto;
}
.split + .split { margin-top: clamp(48px, 7vw, 96px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.band-dark .split + .split { border-top-color: rgba(255,255,255,0.12); }
.split-aside h2 { margin-bottom: 0.4em; }
.aside-title { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 0.3em; }
.aside-note { color: var(--gray); max-width: 34ch; }
.band-dark .aside-note { color: rgba(255,255,255,0.72); }
.aside-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }

@media (min-width: 900px) {
    .split { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
    .split-aside { position: sticky; top: 84px; align-self: start; }
}
@media (min-width: 1100px) {
    .band { padding-left: calc(var(--rail-w) + var(--gutter)); }
}

.prose { margin-bottom: 2rem; }

/* ---------- Panels (education, skills, military, publications) ---------- */

.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--ink);
    padding: clamp(18px, 3vw, 32px);
    margin-bottom: 1.5rem;
}
.panel h3 { margin-bottom: 0.6em; }
.panel ul:last-child { margin-bottom: 0; }

.two-col { columns: 2; column-gap: 32px; }
.two-col li { break-inside: avoid; }
@media (max-width: 560px) { .two-col { columns: 1; } }

.skills-grid { display: grid; grid-template-columns: 1fr; gap: 20px 32px; }
.skill-category h4 { margin-bottom: 0.4em; padding-bottom: 0.3em; border-bottom: 1px solid var(--line); }
.skill-category ul { font-size: 0.95rem; margin-bottom: 0; }
.skill-category li { margin-bottom: 0.25em; }
.skill-category li { overflow-wrap: anywhere; }
@media (min-width: 600px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Timeline (chronological, so the line and markers are earned) ---------- */

.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before {
    content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
    background: var(--line);
}
.timeline .job { position: relative; margin: 0 0 clamp(36px, 5vw, 56px); }
.timeline .job::before {
    content: ""; position: absolute; left: -28px; top: 7px; width: 14px; height: 14px;
    border-radius: 50%; background: var(--scarlet); border: 3px solid var(--paper);
    box-shadow: 0 0 0 1px var(--line);
}
.job-head { margin: 0; font-family: var(--sans); font-size: 1rem; font-weight: 400; letter-spacing: 0; line-height: 1.4; }

/* The whole header row is the toggle. */
.job-toggle {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
    width: 100%; padding: 0; margin: 0;
    background: none; border: 0; border-radius: 2px;
    font: inherit; color: inherit; text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.job-meta { display: block; min-width: 0; }
.job-date {
    display: block; font-size: 0.9rem; color: var(--gray); margin-bottom: 0.2em;
    font-variant-numeric: tabular-nums;
}
.job-company {
    display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
    line-height: 1.15; letter-spacing: -0.012em; margin-bottom: 0.15em;
    transition: color 0.2s;
}
.job-title { display: block; font-weight: 600; }
.job-toggle:hover .job-company { color: var(--scarlet); }

/* Round "+" at the right edge; becomes an "x" when open. */
.job-plus {
    position: relative; flex: 0 0 auto;
    width: 36px; height: 36px; margin-top: 2px;
    border: 1.5px solid var(--ink); border-radius: 50%;
    transition: transform 0.35s var(--ease-out), background 0.2s, border-color 0.2s;
}
.job-plus::before, .job-plus::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    background: var(--ink); transition: background 0.2s;
}
.job-plus::before { width: 14px; height: 2px; margin: -1px 0 0 -7px; }
.job-plus::after  { width: 2px; height: 14px; margin: -7px 0 0 -1px; }
.job-toggle:hover .job-plus { border-color: var(--scarlet); background: var(--scarlet); }
.job-toggle:hover .job-plus::before, .job-toggle:hover .job-plus::after { background: var(--white); }
.job-toggle[aria-expanded="true"] .job-plus { transform: rotate(45deg); }

/* Collapsible body. Hidden only once JS is running (html.has-js); without
   JS every role is open. grid-template-rows 0fr -> 1fr animates height
   without measuring; visibility keeps collapsed links out of the tab order. */
.job-details { margin-top: 0.6em; }
.job-details-inner { min-height: 0; }
html.has-js .job-details {
    display: grid; grid-template-rows: 0fr;
    opacity: 0; visibility: hidden; margin-top: 0;
}
html.has-js .job-details-inner { overflow: hidden; }
html.has-js .job.is-open .job-details {
    grid-template-rows: 1fr; opacity: 1; visibility: visible; margin-top: 0.6em;
}
.job ul { max-width: var(--measure); margin-bottom: 0; list-style: disc; }
.job li { margin-bottom: 0.5em; }

.timeline-controls { display: flex; align-items: center; gap: 10px; margin: 0 0 1.4rem; color: var(--gray); font-size: 0.9rem; }
.text-btn {
    background: none; border: 0; padding: 2px 0; margin: 0; font: inherit; cursor: pointer;
    color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em;
}
.text-btn:hover { color: var(--ink); }

/* ---------- Speaking ---------- */

.photo-wide { margin: 0 0 1.5rem; }
.photo-wide img { width: 100%; max-width: 800px; border: 1px solid var(--line); }
.talks { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.talks li {
    padding: 14px 0; margin: 0;
    border-top: 1px solid var(--line);
}
.talks li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- Shipped ---------- */

.ship-list { display: grid; gap: 0; }
.ship {
    display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px;
    padding: clamp(24px, 3vw, 36px) 0;
    border-top: 1px solid rgba(255,255,255,0.14);
}
.ship:last-child { border-bottom: 1px solid rgba(255,255,255,0.14); }
.ship-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.06); color: var(--scarlet);
    font-size: 1.35rem;
}
.ship-body h3 { margin-bottom: 0.35em; }
.ship-body p { max-width: var(--measure); color: rgba(255,255,255,0.86); }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.1em; display: flex; flex-wrap: wrap; gap: 8px; }
.feature-list li {
    margin: 0; font-size: 0.88rem; padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.22); border-radius: 999px;
}
@media (max-width: 520px) {
    .ship { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Writing ---------- */

.book {
    display: grid; grid-template-columns: 18px 1fr; gap: 20px;
    background: var(--white); border: 1px solid var(--line);
    padding: clamp(18px, 3vw, 32px);
    margin-bottom: 2.5rem;
}
.book-spine { background: var(--ink); border-right: 2px solid var(--scarlet); grid-row: 1 / span 2; }
.book-cover {
    display: block; width: 150px; max-width: 100%;
    grid-column: 2; justify-self: start;
}
.book-cover img {
    width: 100%; aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    box-shadow: 2px 4px 14px rgba(27,27,27,0.18);
}
.book-cover:hover img, .book-cover:focus-visible img { box-shadow: 2px 4px 14px rgba(187,0,0,0.3); }
.book-body { grid-column: 2; }
.book-body h3 { margin-bottom: 0.4em; }
.book-body p { max-width: 50ch; }
@media (min-width: 640px) {
    .book { grid-template-columns: 18px auto minmax(0, 1fr); gap: 20px 28px; align-items: start; }
    .book-spine { grid-row: 1; }
    .book-cover { grid-column: 2; width: clamp(150px, 16vw, 180px); }
    .book-body { grid-column: 3; }
}

.episodes { list-style: none; margin: 0; padding: 0; counter-reset: ep; }
.episodes li { margin: 0; }
.episode {
    display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px;
    padding: 18px 0; border-top: 1px solid var(--line);
    color: inherit; text-decoration: none;
}
.episodes li:last-child .episode { border-bottom: 1px solid var(--line); }
.episode:hover .episode-title, .episode:focus-visible .episode-title { color: var(--link); }
.episode:hover .episode-cta { color: var(--ink); }
.episode-num {
    font-family: var(--serif); font-size: 1.6rem; line-height: 1; color: var(--gray);
    font-variant-numeric: tabular-nums; padding-top: 2px;
}
.episode-text { display: block; }
.episode-title { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25em; transition: color 0.2s; }
.episode-title i { color: var(--scarlet); font-size: 0.9em; margin-right: 6px; }
.episode-desc { display: block; max-width: var(--measure); color: var(--gray); margin-bottom: 0.4em; }
.episode-cta { display: inline-block; font-size: 0.9rem; color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------- Ventures ---------- */

.venture {
    background: var(--white); border: 1px solid var(--line);
    padding: clamp(20px, 3vw, 36px);
    margin-bottom: 1.5rem;
}
.venture-head { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: center; margin-bottom: 1.2rem; }
.venture-logo { width: 110px; height: auto; }
.venture-name { margin-bottom: 0.1em; }
.venture-tagline { color: var(--gray); margin: 0; }
.status-badge {
    display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
    padding: 2px 8px; border-radius: 3px; margin-bottom: 6px;
}
.status-badge.active { background: #1F6B3A; color: var(--white); }
.venture p { max-width: var(--measure); }
.venture-highlights { max-width: var(--measure); }
.story {
    background: var(--paper); border-left: 4px solid var(--scarlet);
    padding: 18px 22px; margin: 1.2rem 0 1.5rem;
    max-width: calc(var(--measure) + 44px);
}
.story h4 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5em; }
.story p:last-child { margin-bottom: 0; }
.venture-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.social-link {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--ink); color: var(--white); text-decoration: none;
}
.social-link:hover { background: var(--scarlet); color: var(--white); }
.venture-link { font-weight: 600; }
@media (max-width: 520px) {
    .venture-head { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */

.contact { text-align: left; }
.contact-inner { max-width: 1240px; margin: 0 auto; }
.contact h2 { max-width: 18ch; }
.contact p { max-width: 50ch; color: rgba(255,255,255,0.86); }

/* ---------- Buttons ---------- */
/* White on scarlet is 6.8:1; scarlet is never used as small text on charcoal. */

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border: 2px solid transparent; border-radius: 4px;
    font-weight: 600; font-size: 0.95rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-lg { padding: 16px 28px; font-size: 1.1rem; }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--scarlet); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { border-color: var(--scarlet-tint); color: var(--scarlet-tint); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-2); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-scarlet { background: var(--scarlet); color: var(--white); }
.btn-scarlet:hover { background: var(--scarlet-deep); color: var(--white); }
.band-dark .btn-scarlet:hover { background: var(--white); color: var(--scarlet); }
.btn-muted { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); cursor: default; }

/* ---------- Footer (loaded by include.js) ---------- */

.site-footer {
    padding: 28px var(--gutter);
    border-top: 1px solid var(--line);
    color: var(--gray); font-size: 0.9rem;
}
.site-footer p { margin: 0; max-width: 1240px; margin-inline: auto; }
@media (min-width: 1100px) { .site-footer { padding-left: calc(var(--rail-w) + var(--gutter)); } }

/* ---------- Scroll-driven reveals ----------
   JS adds `is-in` when an element enters the viewport. Stagger is set per
   element via --i (sibling index) from JS. Everything is visible by default
   when motion is reduced or JS is absent, because the hidden state is only
   applied inside the no-preference media query AND under html.js. */

@media (prefers-reduced-motion: no-preference) {
    html.js .reveal {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
        transition-delay: calc(var(--i, 0) * 70ms);
    }
    html.js .reveal.is-in { opacity: 1; transform: none; }

    /* Masked line reveal: JS wraps the heading text in .wipe-in; the heading
       clips, the inner line slides up into place. (clip-path on the element
       itself would make IntersectionObserver report zero area in Chrome.) */
    html.js .wipe { overflow: hidden; padding-bottom: 0.12em; margin-bottom: calc(0.5em - 0.12em); }
    html.js .wipe > .wipe-in {
        display: block;
        transform: translateY(110%);
        transition: transform 1s var(--ease-wipe);
    }
    html.js .wipe.is-in > .wipe-in { transform: none; }

    .rail a::before { transition: background 0.25s, border-color 0.25s, transform 0.25s; }

    /* Role expanders: height + opacity reveal; visibility flips after the
       collapse finishes so the content doesn't vanish mid-animation. */
    html.has-js .job-details {
        transition: grid-template-rows 0.45s var(--ease-out), opacity 0.3s var(--ease-out),
                    margin-top 0.45s var(--ease-out), visibility 0s linear 0.45s;
    }
    html.has-js .job.is-open .job-details {
        transition: grid-template-rows 0.45s var(--ease-out), opacity 0.35s var(--ease-out) 0.1s,
                    margin-top 0.45s var(--ease-out), visibility 0s;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-scroll span { animation: none; }
    .btn, .episode-title, .rail a span, .rail a::before, .job-plus, .job-plus::before, .job-plus::after, .job-company, .job-details { transition: none; }
}

/* About closing line doubles as the call to action */
.summary-cta { margin-top: 1.25rem; }
.summary-cta a {
    font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--scarlet);
    text-decoration: none; border-bottom: 2px solid var(--scarlet); padding-bottom: 2px;
    transition: color 160ms ease, border-color 160ms ease;
}
.summary-cta a::after { content: " \2192"; }
.summary-cta a:hover, .summary-cta a:focus-visible { color: var(--scarlet-deep); border-color: var(--scarlet-deep); }

/* Education and Skills as plain timeline entries after the About copy */
.timeline-extras { margin-top: 1.5rem; }
.timeline-extras .job-details-inner > p:first-child { margin-top: 0.9em; }
.timeline-extras .skills-grid ul, .timeline-extras .certifications { margin-bottom: 0; }
