/* Muthomi Kathurima: public site
   Palette: cool paper, deep forest, and one red taken from the portrait's tie.
   Type: Archivo (variable width) for voice and display, Newsreader for reading. */

/* Self-hosted fonts (latin subset). Archivo is variable in width and weight. */
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 400 900;
    font-stretch: 62% 100%;
    font-display: swap;
    src: url("/fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/newsreader-latin-italic.woff2") format("woff2");
}

:root {
    --paper: #EBECE8;
    --surface: #F6F6F3;
    --ink: #1C211F;
    --muted: #59615D;
    --line: #CBCEC7;
    --forest: #183A2E;
    --forest-ink: #DCE5DF;
    --signal: #C8202F;
    --signal-hover: #A91825;

    --sans: "Archivo", system-ui, sans-serif;
    --serif: "Newsreader", Georgia, serif;

    --gutter: clamp(16px, 4vw, 48px);
    --max: 1280px;
    --radius-lg: 28px;
    --radius-sm: 10px;

    /* Type scale: 1.25 ratio from 17px */
    --t-sm: 0.875rem;
    --t-base: 1.0625rem;
    --t-md: 1.33rem;
    --t-lg: 1.66rem;
    --t-xl: clamp(1.9rem, 1.2rem + 2.4vw, 2.6rem);
    --t-2xl: clamp(2.3rem, 1.3rem + 3.6vw, 3.6rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--t-base);
    line-height: 1.55;
    font-variation-settings: "wdth" 100;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius-sm);
}
.skip:focus { top: 16px; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Shared pieces ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: 600 var(--t-sm)/1 var(--sans);
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--forest); }
.btn--signal { background: var(--signal); color: #fff; }
.btn--signal:hover { background: var(--signal-hover); }
.btn--ghost { border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: var(--forest-ink); color: var(--forest-ink); }
.btn--light:hover { background: var(--forest-ink); color: var(--forest); }

.link {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}
.link:hover { color: var(--signal); }

.chip {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: var(--t-sm);
    text-decoration: none;
    background: var(--surface);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.section-title {
    margin: 0;
    font-size: var(--t-2xl);
    font-weight: 750;
    font-variation-settings: "wdth" 80;
    line-height: 1.02;
    letter-spacing: -0.01em;
}

.empty { color: var(--muted); font-size: var(--t-md); max-width: 48ch; }


/* ---------- Nav ---------- */

.nav { padding: 18px 0; }
.nav__inner { display: flex; align-items: center; gap: 24px; }
.nav__mark { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.nav__monogram {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    font-weight: 800;
    font-size: 0.8rem;
    font-variation-settings: "wdth" 70;
    letter-spacing: 0.02em;
}
.nav__name { font-weight: 650; font-variation-settings: "wdth" 88; }
.nav__links { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); }
.nav__links a { text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav__links a:hover, .nav__links a.is-active { border-color: currentColor; }

@media (max-width: 760px) {
    .nav__hide-sm { display: none; }
    .nav__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .nav__links { gap: 18px; }
    .nav__cta { min-height: 40px; padding: 0 16px; }
}

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

.hero { padding-top: clamp(28px, 6vw, 72px); }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px 48px;
    align-items: end;
}
.hero__hello {
    margin: 0 0 14px;
    font-size: var(--t-md);
    font-weight: 500;
    color: var(--muted);
}
.hero__lede {
    margin: 0;
    max-width: 30ch;
    font-size: var(--t-xl);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.012em;
    font-variation-settings: "wdth" 92;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__card {
    display: grid;
    gap: 16px;
    padding-left: 20px;
    border-left: 2px solid var(--ink);
}
.hero__role { margin: 0; font-size: var(--t-base); font-weight: 600; line-height: 1.35; }

/* The masthead: the name set as the page's one loud element.
   "KATHURIMA" is ~4.23em wide at wdth 62, so it is sized in container units
   to span the full width at every size. */
.masthead {
    max-width: var(--max);
    margin: clamp(28px, 5vw, 56px) auto 0;
    padding: 0 var(--gutter);
    container-type: inline-size;
}
.masthead__inner {
    font-size: calc(100cqi / 4.3);
    border-bottom: 2px solid var(--ink);
    overflow: hidden;
}
.masthead__name {
    margin: 0;
    font-size: 1em;
    font-weight: 850;
    font-variation-settings: "wdth" 62;
    text-transform: uppercase;
    line-height: 0.8;
    letter-spacing: -0.015em;
}
.masthead__line { display: block; }
.masthead__line--2 { margin-bottom: -0.075em; }

@media (prefers-reduced-motion: no-preference) {
    .masthead__line { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
    .masthead__line--2 { animation-delay: .08s; }
    @keyframes rise {
        from { transform: translateY(24%); opacity: 0; }
        to { transform: none; opacity: 1; }
    }
}

@media (max-width: 760px) {
    .hero__grid { grid-template-columns: 1fr; }
}

/* ---------- Current role ---------- */

.now { padding: clamp(64px, 10vw, 120px) 0 0; }
.now__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px 64px;
    align-items: start;
}
.now__body { margin: 22px 0 0; max-width: 56ch; font-size: var(--t-md); line-height: 1.45; }
.now__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.now__steps li { counter-increment: step; padding-top: 16px; border-top: 2px solid var(--ink); }
.now__steps li::before {
    content: counter(step);
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    font-variation-settings: "wdth" 62;
    font-size: var(--t-lg);
    line-height: 1;
    color: var(--signal);
}
.now__steps h3 { margin: 0 0 6px; font-size: var(--t-base); font-weight: 700; }
.now__steps p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.now__figure {
    margin: 0;
    padding: 32px;
    background: var(--forest);
    color: var(--forest-ink);
    border-radius: var(--radius-lg);
}
.now__number {
    margin: 0;
    color: #fff;
    font-size: clamp(3.4rem, 2rem + 5vw, 6.2rem);
    font-weight: 850;
    font-variation-settings: "wdth" 62;
    line-height: 0.9;
    letter-spacing: -0.01em;
}
.now__figure figcaption { margin: 14px 0 24px; max-width: 26ch; font-size: var(--t-md); line-height: 1.35; }
.now__figure .link { color: #fff; }
.now__figure .link:hover { color: var(--forest-ink); }

@media (max-width: 860px) {
    .now__grid { grid-template-columns: 1fr; }
    .now__steps { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Experience ---------- */

.career { padding: clamp(56px, 9vw, 104px) 0; background: var(--surface); }
.career__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px 64px; align-items: start; }
.career__aside { position: sticky; top: 24px; }
.career__intro { margin: 14px 0 0; color: var(--muted); max-width: 36ch; }
.career__subhead { margin: 32px 0 10px; font-size: var(--t-base); font-weight: 700; }
.career__facts { margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--muted); }
.career__facts li { padding: 8px 0; border-top: 1px solid var(--line); }
.career__facts strong { color: var(--ink); font-weight: 600; }

.career__orgs { margin: 0; padding: 0; list-style: none; }
.career__org { padding: 28px 0; border-top: 2px solid var(--ink); }
.career__org:first-child { padding-top: 0; border-top: 0; }
.career__org-name {
    margin: 0 0 18px;
    font-size: var(--t-lg);
    font-weight: 750;
    font-variation-settings: "wdth" 80;
    line-height: 1.1;
}
.career__org-name a { text-decoration: none; }
.career__org-name a:hover { text-decoration: underline; text-underline-offset: 4px; }

.career__roles { margin: 0; padding: 0; list-style: none; }
.career__role {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 4px 28px;
    padding: 0 0 22px;
}
/* Dot per role, with a thread joining roles at the same organization.
   Both sit in the centre of the 28px column gap. */
.career__role::before {
    content: "";
    position: absolute;
    left: 159px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    background: var(--surface);
    z-index: 1;
}
.career__role.is-current::before { background: var(--signal); border-color: var(--signal); }
.career__roles .career__role:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 164px;
    top: 16px;
    bottom: -6px;
    border-left: 1px solid var(--line);
}
.career__period { margin: 1px 0 0; font-size: var(--t-sm); color: var(--muted); }
.career__title { margin: 0; font-size: var(--t-base); font-weight: 700; font-variation-settings: "wdth" 92; }
.career__summary { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }
.career__details { margin-top: 10px; font-size: 0.95rem; }
.career__details summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: var(--t-sm);
    font-weight: 600;
    list-style: none;
}
.career__details summary::-webkit-details-marker { display: none; }
.career__details summary::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-size: 0.8rem;
    line-height: 1;
}
.career__details[open] summary::before { content: "\2212"; }
.career__details ul { margin: 10px 0 0; padding-left: 18px; max-width: 60ch; }
.career__details li { margin: 0 0 6px; }
.career__details li::marker { color: var(--signal); }

@media (max-width: 860px) {
    .career__grid { grid-template-columns: 1fr; }
    .career__aside { position: static; }
    .career__role { grid-template-columns: 1fr; padding-left: 24px; }
    .career__role::before { left: 0; top: 4px; }
    .career__roles .career__role:not(:last-child)::after { left: 5px; }
    .career__period { margin: 0; }
}

/* Impact list beside the Tap2Eat figure */
.now__side { display: grid; gap: 0; }
.now__impact-title { margin: 32px 0 8px; font-size: var(--t-base); font-weight: 700; }
.now__impact { margin: 0; padding: 0; list-style: none; font-size: 0.95rem; }
.now__impact li { padding: 10px 0 10px 18px; border-top: 1px solid var(--line); position: relative; }
.now__impact li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 2px; background: var(--signal); }

.hero__role a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Quote ---------- */

.quote { padding: clamp(64px, 10vw, 120px) 0; }
.quote__inner { margin: 0; max-width: 980px; padding-left: clamp(20px, 3vw, 36px); border-left: 3px solid var(--signal); }
.quote__text {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.7rem, 1rem + 2.6vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.quote__cite { margin-top: 18px; font-size: var(--t-sm); color: var(--muted); }

.now__context { margin: -12px 0 24px; font-size: var(--t-sm); opacity: 0.85; max-width: 32ch; }

.career__skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.career__skills li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--t-sm); background: var(--paper); }
.career__type { font-size: 0.8rem; }

.work__rows { row-gap: 44px; }

/* ---------- What I do ---------- */

.work {
    padding: clamp(56px, 9vw, 104px) 0;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.work__head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 20px 64px;
    align-items: end;
    margin-bottom: clamp(36px, 6vw, 64px);
}
.work__intro { margin: 0; max-width: 50ch; font-size: var(--t-md); line-height: 1.4; color: var(--muted); }
.work__rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.work__row { padding-top: 22px; border-top: 2px solid var(--ink); }
.work__title {
    margin: 0 0 12px;
    font-size: var(--t-lg);
    font-weight: 700;
    font-variation-settings: "wdth" 85;
    line-height: 1.12;
}
.work__body { margin: 0; color: var(--muted); max-width: 42ch; }

@media (max-width: 860px) {
    .work__head, .work__rows { grid-template-columns: 1fr; }
    .work__rows { gap: 32px; }
}

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

.latest { padding: clamp(56px, 9vw, 104px) 0; background: var(--surface); }
.latest--list { background: transparent; padding-top: 24px; }
.page-home .latest { padding-top: 0; }
.latest__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 36px; }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; }

.post__link { display: block; text-decoration: none; height: 100%; }
.post__media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--line);
}
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post__link:hover .post__media img { transform: scale(1.03); }
.post__body { padding-top: 16px; }
.post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0 0 8px;
    font-size: var(--t-sm);
    color: var(--muted);
}
.post__tag { color: var(--ink); font-weight: 600; }
.post__title {
    margin: 0;
    font-size: var(--t-md);
    font-weight: 700;
    font-variation-settings: "wdth" 88;
    line-height: 1.2;
    text-wrap: balance;
}
.post__link:hover .post__title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.post__excerpt { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

.post--featured { grid-column: 1 / -1; }
.post--featured .post__link {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 40px;
    align-items: center;
}
.post--featured .post__media { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }
.post--featured .post__title { font-size: var(--t-xl); font-variation-settings: "wdth" 80; line-height: 1.06; }
.post--featured .post__excerpt { font-family: var(--serif); font-size: var(--t-md); line-height: 1.45; }

@media (max-width: 960px) {
    .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .posts { grid-template-columns: 1fr; }
    .post--featured .post__link { grid-template-columns: 1fr; gap: 0; }
    .post--featured .post__media { border-radius: var(--radius-sm); }
}

.page-head { padding: clamp(40px, 7vw, 88px) 0 32px; }
.page-head__title {
    margin: 0;
    font-size: min(18vw, 200px);
    font-weight: 850;
    font-variation-settings: "wdth" 62;
    line-height: 0.82;
    letter-spacing: -0.015em;
    text-transform: uppercase;
}
.page-head__lede { margin: 20px 0 0; max-width: 46ch; font-size: var(--t-md); line-height: 1.4; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }

.pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.pager > :last-child { justify-self: end; }
.pager__count { font-size: var(--t-sm); color: var(--muted); }

/* ---------- Open source ---------- */

.oss { padding: clamp(56px, 9vw, 104px) 0; }
.oss__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 64px; }
.oss__intro { margin: 14px 0 0; color: var(--muted); max-width: 34ch; }
.oss__list { margin: 0; padding: 0; list-style: none; }
.oss__list li { border-top: 1px solid var(--line); }
.oss__list li:last-child { border-bottom: 1px solid var(--line); }
.oss__list a, .oss__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 24px;
    padding: 18px 0;
    text-decoration: none;
}
.oss__list a:hover .oss__name { color: var(--signal); }
.oss__name { font-weight: 650; font-variation-settings: "wdth" 88; overflow-wrap: anywhere; }
.oss__body { color: var(--muted); }

@media (max-width: 860px) {
    .oss__grid { grid-template-columns: 1fr; }
    .oss__list a { grid-template-columns: 1fr; }
}

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

.contact {
    margin: 0 var(--gutter);
    padding: clamp(56px, 9vw, 112px) 0;
    background: var(--forest);
    color: var(--forest-ink);
    border-radius: var(--radius-lg);
}
.contact__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: end; }
.contact__title {
    margin: 0;
    color: #fff;
    font-size: clamp(2.6rem, 1.4rem + 5vw, 5.4rem);
    font-weight: 800;
    font-variation-settings: "wdth" 68;
    line-height: 0.95;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.contact__side p { margin: 0 0 24px; max-width: 40ch; font-size: var(--t-md); line-height: 1.4; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
    .contact__grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

.footer { padding: 48px 0 40px; font-size: var(--t-sm); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 32px; }
.footer__motto { margin: 0 auto 0 0; font-family: var(--serif); font-style: italic; font-size: var(--t-md); }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; list-style: none; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__legal { width: 100%; margin: 0; color: var(--muted); }

/* ---------- Article ---------- */

.article { padding-bottom: clamp(56px, 9vw, 104px); }
.article__head { max-width: 920px; padding-top: clamp(32px, 6vw, 72px); }
.article__back { display: inline-block; margin-bottom: 28px; font-size: var(--t-sm); }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.article__title {
    margin: 0;
    font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.6rem);
    font-weight: 800;
    font-variation-settings: "wdth" 70;
    line-height: 0.98;
    letter-spacing: -0.012em;
    text-wrap: balance;
}
.article__dek {
    margin: 22px 0 0;
    max-width: 56ch;
    font-family: var(--serif);
    font-size: var(--t-md);
    line-height: 1.45;
    color: var(--muted);
}
.article__byline { display: flex; align-items: center; gap: 12px; margin: 28px 0 0; font-size: var(--t-sm); line-height: 1.35; }
.article__byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface); }
.article__byline time { color: var(--muted); }

.article__cover { margin: clamp(32px, 5vw, 56px) auto; }
.article__cover img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius-lg); }

.article__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px 80px;
    align-items: start;
}
.article__aside { position: sticky; top: 24px; display: grid; gap: 32px; font-size: var(--t-sm); }
.aside-author { padding: 24px; background: var(--surface); border-radius: var(--radius-sm); }
.aside-author__name { margin: 0 0 8px; font-weight: 700; font-size: var(--t-base); }
.aside-author p { margin: 0 0 14px; color: var(--muted); }
.aside-recent__title { margin: 0 0 8px; font-size: var(--t-base); font-weight: 700; }
.aside-recent ul { margin: 0; padding: 0; list-style: none; }
.aside-recent li { border-top: 1px solid var(--line); }
.aside-recent a { display: block; padding: 12px 0; text-decoration: none; line-height: 1.35; }
.aside-recent a:hover { color: var(--signal); }

@media (max-width: 960px) {
    .article__layout { grid-template-columns: 1fr; }
    .article__aside { position: static; }
}

/* Long-form body from the editor */
.prose {
    max-width: 68ch;
    font-family: var(--serif);
    font-size: 1.22rem;
    line-height: 1.68;
    overflow-wrap: break-word;
}
.prose * { max-width: 100%; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure, .prose table { margin: 0 0 1.3em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
    margin: 1.8em 0 0.6em;
    font-family: var(--sans);
    font-variation-settings: "wdth" 85;
    font-weight: 700;
    line-height: 1.15;
}
.prose h1, .prose h2 { font-size: var(--t-lg); }
.prose h3, .prose h4 { font-size: var(--t-md); }
.prose a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--signal); }
.prose img { height: auto !important; border-radius: var(--radius-sm); }
.prose blockquote {
    padding-left: 22px;
    border-left: 3px solid var(--signal);
    font-style: italic;
    color: var(--muted);
}
.prose code {
    padding: 2px 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.86em;
}
.prose pre {
    padding: 18px 20px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.55;
}
.prose pre code { padding: 0; background: none; border: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: var(--t-sm); display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* ---------- Photography ---------- */

.photos {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 20px;
    margin-top: clamp(40px, 6vw, 72px);
}
.photos__item { margin: 0; }
.photos__item img { width: 100%; height: clamp(260px, 36vw, 500px); object-fit: cover; border-radius: var(--radius-sm); }
.photos__item--tall img { object-position: 55% 60%; }
.photos__item figcaption { margin-top: 10px; font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 700px) { .photos { grid-template-columns: 1fr; } }

.hack { padding: clamp(56px, 9vw, 104px) 0; }
.hack__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 28px 56px;
    align-items: center;
}
.hack__photo { margin: 0; }
.hack__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); }
.hack .section-title { font-size: var(--t-xl); line-height: 1.02; }
.hack__body { margin: 20px 0 0; color: var(--muted); max-width: 52ch; }
.hack__subhead { margin: 26px 0 8px; font-size: var(--t-base); font-weight: 700; }
.hack__list { margin: 0 0 24px; padding: 0; list-style: none; }
.hack__list li { position: relative; padding: 10px 0 10px 18px; border-top: 1px solid var(--line); font-size: 0.95rem; }
.hack__list li::before { content: ""; position: absolute; left: 0; top: 20px; width: 8px; height: 2px; background: var(--signal); }
.hack__more { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hack__team { margin: 0; }
.hack__team img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.hack__team:last-child img { object-position: 50% 20%; }
@media (max-width: 860px) { .hack__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hack__more { grid-template-columns: 1fr; } }

.career__edu { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: start; }
.career__edu img { width: 72px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; }

/* ---------- Article images from the editor ---------- */

.prose p > img:only-child, .prose figure.image img { width: auto; max-width: 100%; max-height: 760px; margin: 0 auto; }
.prose figure.image { margin: 1.8em 0; }
.prose figcaption { margin-top: 10px; font-family: var(--sans); font-size: var(--t-sm); line-height: 1.45; color: var(--muted); }
.prose .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 1.8em 0;
}
.prose .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
