/* ---------- About page ---------- */

/* The About page is mostly sub-column layouts, so widen the content column
   (and the footer, via the shared --page-width mechanism in site.css) to the
   header's own box: max-width 1200px with the header's 48px side padding, so
   the content's edges line up with the logo and the RSS icon. The tablet band
   below matches the header's 24px there. */
body:has(.about) {
    --page-width: 1200px;
    --container-pad: 48px;
}

/* Body text on About sits at the secondary muted colour - Apple's pattern
   for marketing/about-style pages. Headings (via global h1-h6 rule),
   the tagline and emphasized labels keep the brighter --text. */
.about {
    color: var(--text-secondary);
    margin-top: 40px;
}

.about p:not(.about-tagline) {
    margin-bottom: 1.25em;
}

.about-job-co {
    color: var(--text);
    font-weight: 700;
    font-size: 1.14em;
}

/* Company icon beside each Work entry: an app-icon tile spanning the name and
   role lines, like a list row. Each job becomes a two-column grid - icon, then
   the name over the role - and the description paragraphs run full width
   beneath. Squircled like every rounded element. Decorative (alt=""); the
   name carries the meaning. */
.about-job:has(> .about-co) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.55em;
    align-items: center;
}
/* Tighter name/role pair beside the icon: trim the title's leading and its
   bottom margin so the two lines read as one block. */
.about-job:has(> .about-co) > h3,
.about-job:has(> .about-co) > .about-job-head {
    line-height: 1.08;
    margin-bottom: 0;
    /* Visual nudges (relative offsets don't touch layout): the name sits 2px
       closer to the role line, and the pair sits 2px lower against the
       icon - so name +4px, role +2px. */
    position: relative;
    top: 4px;
}
.about-job:has(> .about-co) > * {
    grid-column: 2;
}
.about-job:has(> .about-co) > p:not(.about-meta) {
    grid-column: 1 / -1;
}
.about-job:has(> .about-co) > .about-co {
    grid-column: 1;
    grid-row: 1 / span 2;
    /* Pin to the top: when the name or role wraps (narrow columns), the icon
       stays level with the first line instead of centring on the block. */
    align-self: start;
}
.about-co-icon {
    display: block;
    width: 2.9em;
    height: 2.9em;
    /* 25%, tuned by eye on a desktop monitor. corner-shape gives the squircle
       in browsers that support it; elsewhere it's a plain 25% round corner. */
    border-radius: 25%;
    corner-shape: squircle;
    /* The shared image hairline, so the white tiles still read on the white
       page in light mode. An inset box-shadow would paint under the image,
       so it's an outline pulled inside. */
    outline: 1px solid var(--image-stroke);
    outline-offset: -1px;
}
/* Icons link to the same place as the company name (a duplicate link, so
   it's out of the tab order and hidden from screen readers in the markup). On
   hover they grow like the titles do and pick up a soft glow - a shadow in
   light mode, a faint light halo in dark. */
.about-co {
    display: block;
    --co-glow: rgba(0, 0, 0, 0.22);
}
[data-color-scheme="dark"] .about-co {
    --co-glow: rgba(255, 255, 255, 0.18);
}
a.about-co .about-co-icon {
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (hover: hover) {
    a.about-co:hover .about-co-icon {
        transform: scale(1.06);
        box-shadow: 0 4px 18px var(--co-glow);
    }
}
@media (prefers-reduced-motion: reduce) {
    a.about-co:hover .about-co-icon {
        transform: none;
    }
}
.about-job--featured .about-co-icon {
    width: 3.4em;
    height: 3.4em;
}
/* Keeps "2026 - present · Tokyo" together when the role line wraps beside
   an icon on phones, instead of stranding "· Tokyo" (or breaking after the
   hyphen) on a line of its own. */
.about-meta-keep {
    white-space: nowrap;
}
/* With the icon beside it, the role line's gap to the description moves off
   the meta (which now sits in the icon's row) onto the first paragraph. */
.about .about-job:has(> .about-co) p.about-meta {
    margin-bottom: 0;
    /* Nudge the role line 2px lower against the icon (see the name above). */
    position: relative;
    top: 2px;
}
.about .about-job:has(> .about-co) p.about-meta + p {
    margin-top: 0.75em;
}

/* Body prose inside .about-cols (the "A brief history" right column AND
   job description paragraphs in Work) reads as long-form content, so
   promote it back to --text. The :not() keeps .about-meta lines muted. */
.about-cols p:not(.about-meta) {
    color: var(--text);
}

/* Hero - page title, tagline and blurb stacked in the left column with the
   portrait pinned on the right. */

.about-intro {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5em;
    align-items: center;
    margin: 0 0 4em;
    font-size: 16.5pt;
    color: var(--text);
}

.about-intro .page-title {
    text-align: left;
    margin: 0 0 0.1em;
}

.about-tagline {
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    text-wrap: balance;
    margin: 0 0 0.5em;
}

.about-intro p:last-child {
    margin-bottom: 0;
}

.about-intro p:not(.about-tagline) {
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.4;
}

.about-portrait {
    margin: 0;
    text-align: center;
}

.about-portrait img {
    width: 350px;
    height: 424px;
    border: 1px solid var(--border);
    border-radius: 30px;
    corner-shape: squircle;
    margin: 0 auto 0.6em;
    display: block;
    object-fit: cover;
}

/* Sections - heading + optional subtitle, separated by a hairline */

.about-section {
    margin: 0 0 5em;
}

.about-section-header {
    margin: 0 0 2em;
}

.about-section-header h2 {
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.about-section-subtitle {
    font-size: 1.05em;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0.8em 0 0;
}

/* Two-column body layout, shared by "A brief history" and "Work" */

.about-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

/* "About this site": the Colophon card hugs its rows and the prose takes the
   rest rather than equal halves - so the pair stays side by side down to iPad
   landscape. Side by side, no spec value wraps ("Swift, HTML, CSS,
   JavaScript" is the longest, ~415px of card); the 460px cap leaves room for
   Safari's slightly wider SF Pro. On desktop (above the 1000px tablet tier,
   and not an iPad - landscape iPads are wider than that but keep the compact
   card) the label column gets an extra 64px of air (~479px card, 524px cap). Stack
   once the prose would fall below ~375px: 460 + 36 gap + 375 = 871px, rounded
   up to 880px of SECTION width (a container query, so it tracks the real
   column size, not the viewport).
   Stacked, values wrap as normal on narrow phones. */
.about-section--site {
    container-type: inline-size;
}

.about-section--site .about-cols {
    grid-template-columns: minmax(0, 1fr) fit-content(460px);
}
@media (min-width: 1000.02px) {
    html:not(.is-ipad) .about-section--site .about-cols {
        grid-template-columns: minmax(0, 1fr) fit-content(524px);
    }
}

@container (max-width: 880px) {
    .about-section--site .about-cols {
        grid-template-columns: 1fr;
    }
}

@container (min-width: 880.02px) {
    .about-section--site .about-colophon dd {
        white-space: nowrap;
    }
    /* Side by side, the card plainly belongs to the prose beside it and a
       second title would compete with the section's own heading and tagline,
       so the "Colophon" heading only shows once the card stacks below the
       prose. It stays in the accessibility tree (the aside's label). */
    .about-specs .card-heading {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}
@media (min-width: 1000.02px) {
    html:not(.is-ipad) .about-section--site .about-colophon .spec-list dt {
        padding-right: calc(1.5em + 64px);
    }
}

/* Narrow first column variant - for "A brief history" the timeline only
   needs about a quarter of the row; the prose gets the remaining 3/4. */
.about-cols--narrow {
    grid-template-columns: 1fr 3fr;
}

.about-meta {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 0 0 1em;
}

/* Timeline (A brief history) - vertical hairline with a black/white dot
   per entry. Each entry has a small grey label (category or date) above
   the heading and a short grey description below. Line and dot are both
   centered on the same x via translateX(-50%) so they sit on the same
   axis; the dot's halo matches --bg so the line doesn't poke through
   the dot visually. */

.about-timeline {
    list-style: none;
    margin: 0;
    padding-left: 28px;
    position: relative;
    /* Size to the entries, not the grid row - otherwise the list stretches to
       the prose column's height and its vertical line (::before) runs on past
       the last entry into empty space. */
    align-self: start;
}

.about-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0.5em;
    /* Stops at the last caption's baseline rather than its line box bottom. */
    bottom: 0.3em;
    width: 1px;
    background: var(--border);
    transform: translateX(-50%);
}

.about-timeline li {
    position: relative;
    margin-bottom: 1.6em;
}

.about-timeline li:last-child {
    margin-bottom: 0;
}

/* The list is a grid item, so the last caption's paragraph margin can't
   collapse out of it - drop it so the list (and its line) ends at the text. */
.about-timeline li:last-child > :last-child {
    margin-bottom: 0;
}

.about-timeline li::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 0.35em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--heading);
    box-shadow: 0 0 0 3px var(--bg);
    transform: translateX(-50%);
}

/* Timeline entries were <h4> before the heading levels were fixed (h2 → h3
   with no h3 in between). Keep the original h4 rendering: SF Pro Text (the
   global h1-h3 rule switches to Display, which reads too wide at this size)
   and the h4 line-height. */
.about-timeline h3 {
    font-family: var(--font-text);
    font-size: 1em;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

/* Muted captions: .about-cols scoping matches the specificity of the body-prose
   colour rule above, which would otherwise win. */
.about-cols .about-timeline p {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 0.2em;
}

/* Small grey eyebrow label used across About - timeline entries, column
   headers ("Currently"/"Previously"), and sub-labels inside job entries. */
.about-label {
    display: block;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 0 0 1em;
}

/* Column headers ("Currently"/"Previously") - a bolder, slightly larger take
   on the eyebrow that reads as a section divider. Kept muted-grey and below the
   1em company names in size so it never competes with the bold job titles below
   it. Colour inherits (--text-secondary). */
.about-label--section {
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.4em;
}

/* Job rows (Work section) */

.about-jobs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-job {
    margin: 0 0 2.6em;
}

.about-job:last-child {
    margin-bottom: 0;
}

/* Featured variant - used in "Currently" column with a big-h3 heading
   over a meta line and a bright description. */
.about-job--featured {
    margin-bottom: 3.5em;
}

/* Work: a wider gutter between Currently and Previously than the other
   two-column blocks, now that the entries themselves are compact. */
.about-cols--work {
    column-gap: 5.5em;
}

/* A deliberate exception to the site-wide "no text-wrap: pretty on body text"
   rule (see site.css): in the short Work descriptions, and in the "About this
   site" prose beside the Colophon card, the evened rag reads better next to
   the neighbouring column's edge, and the columns are wide enough that
   Safari's whole-paragraph re-ragging doesn't leave big gaps. */
.about-cols--work p,
.about-section--site .about-cols p {
    text-wrap: pretty;
}

.about-job--featured h3 {
    font-size: 1.7em;
    font-weight: 700;
    margin: 0;
}

/* Linked job titles: wrap a title's text in <a href> (inside the featured h3
   or .about-job-co) and it keeps the title's colour and weight and gains a
   small up-right arrow (Tabler "arrow-up-right", same set as ui-icons.svg).
   Hover fades in a soft rounded surface behind the title and grows the whole
   title slightly, like the home feed's post titles. Unlinked titles are
   untouched. */
.about-job h3 a,
.about-job-co a {
    position: relative;
    isolation: isolate;          /* keep the ::before surface behind the text but above the page */
    display: inline-block;       /* inline boxes can't be transformed */
    color: inherit;
    text-decoration: none;
    /* Same grow as the home feed's post titles (.post-title-link .title):
       the whole title — text, arrow and surface — scales up a touch. Origin
       on the left so the title's left edge stays aligned with its column. */
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.about-job h3 a:hover,
.about-job-co a:hover {
    color: inherit;
    text-decoration: none;       /* beats the global a:hover underline */
}
.about-job h3 a::before,
.about-job-co a::before {
    content: '';
    position: absolute;
    inset: -0.12em -0.4em;
    z-index: -1;
    border-radius: 0.45em;
    corner-shape: squircle;
    background: var(--bg-secondary);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
/* Beside a company icon the gap is only ~10px, so the hover surface's side
   reach drops to 0.2em (it would otherwise overlap the icon on the large
   Currently titles). */
.about-job:has(> .about-co) h3 a::before,
.about-job:has(> .about-co) .about-job-co a::before {
    inset: -0.12em -0.2em;
}
@media (hover: hover) {
    .about-job h3 a:hover,
    .about-job-co a:hover {
        transform: scale(1.03);
    }
    .about-job h3 a:hover::before,
    .about-job-co a:hover::before {
        opacity: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    .about-job h3 a,
    .about-job-co a {
        transition: none;
    }
    .about-job h3 a:hover,
    .about-job-co a:hover {
        transform: none;
    }
}
/* The arrow is a mask tinted with currentColor, so it follows the text. No
   transition on this masked pseudo (WebKit can leave masked glyphs invisible
   mid-transition) — the hover motion lives on ::before instead. */
.about-job h3 a::after,
.about-job-co a::after {
    --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 7l-10 10'/%3E%3Cpath d='M8 7l9 0l0 9'/%3E%3C/svg%3E");
    content: '';
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    margin-left: 0.02em;
    vertical-align: 0.12em;
    background: currentColor;
    opacity: 0.55;
    -webkit-mask: var(--arrow) center / contain no-repeat;
            mask: var(--arrow) center / contain no-repeat;
}

/* Card header row - title left, meta right, sharing a baseline (hobby cards). */
.hobby-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1em;
}

/* Previously entries: company on its own line, then role · years as an
   .about-meta line beneath - the same shape as the Currently entries. (Years
   were right-pinned once; they looked detached, worst on phones.) */

.about-job p {
    margin: 0;
}

/* Hobby cards (In my free time) - a two-column grid of photo-topped cards.
   Each photo opens in the lightbox. The photo surface is a plain theme fill
   (shared with the gallery cards below): the old per-card pastel tints showed
   through while the lightbox animated an image out of its card. */

/* Two equal columns. This was a staggered bento (7/12 · 5/12, alternating),
   but unequal widths wrapped each card's description to a different number of
   lines, so titles in the same row sat at different heights. Equal cards plus
   a fixed-ratio photo (below) keep each row's titles on one line. */
.hobby-grid {
    /* Bleed past the content column into the page margin on wide screens -
       up to 200px a side, always leaving 24px to the viewport edge - so the
       cards (and their descriptions) get room to breathe. At 1200px and below
       there's no margin to spare and the grid sits in the column as before. */
    --hobby-bleed: clamp(0px, calc((100vw - var(--page-width, 1200px)) / 2 + var(--container-pad, 48px) - 24px), 200px);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-inline: calc(var(--hobby-bleed) * -1);
}

/* Full desktop: the six hobbies sit three to a row (two rows), each card a
   little narrower than the two-column layout gives them. */
@media (min-width: 1280px) {
    .hobby-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hobby-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 24px;
    corner-shape: squircle;
    overflow: hidden;
    background: var(--bg);
}

.hobby-photo {
    position: relative;
    /* Fixed ratio, not flex-grow: every photo is the same height at a given
       card width, so the title beneath always starts at the same point. Any
       spare height in a row goes below the text instead. */
    flex: none;
    /* 17:10, a touch shorter than the 16:10 photo files; the karaoke and
       geocaching data-crop values account for the trimmed top and bottom. */
    aspect-ratio: 17 / 10;
}

.hobby-photo a {
    display: block;
    height: 100%;
    cursor: zoom-in;
}

.hobby-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hobby-photo,
.gallery-card-photo {
    background: var(--bg-secondary);
}

.hobby-body {
    flex: 0 0 auto;
    padding: 18px 22px;
}

/* .hobby-head: title left, meta right (see the header-row recipe above). */
.hobby-card h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--heading);
    margin: 0;
}

/* Every card shows its description beneath the title bar. The extra
   ancestor classes out-specify the broad ".about p" body-prose rule so the
   description keeps its zero bottom margin (the body padding handles the
   gap) instead of inheriting that rule's 1.25em. */
.about .hobby-card .hobby-body p {
    margin: 0.5em 0 0;
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.55;
}

.gallery {
    margin-top: 2.5em;
    position: relative;
}

/* Prev/next controls - floated just below the strip (out of flow) and right-
   aligned, so their height doesn't add to the section's whitespace. Native
   trackpad/touch scroll still works; these give mouse/keyboard a click target.
   Hidden on touch widths (see media query). */
.gallery-nav {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.gallery-arrow {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.gallery-arrow:hover:not(:disabled) {
    background: var(--bg-secondary);
}

.gallery-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.gallery-arrow svg {
    display: block;
}

/* Embla viewport - pulled past the column on each side (negative margin-inline)
   so cards bleed into the page margins. The edge fades are colour-matched
   box-shadow strips, not a mask (see the ::before/::after block below). */
.gallery-scroller {
    /* --overhang: how far the cards bleed past the column into the page margin
       (capped at the available gutter so it never forces a scrollbar). The
       first/last cards rest at the content edge regardless of this - overhang
       only sets how far cards slide out under the fades as you scroll.
       --fade: width of the solid edge strip. Its inner edge sits (overhang -
       fade) = 85px out in the margin, and the box-shadow below blooms inward
       from there, landing just shy of the content edge so the gradient clears
       the resting card. Raise the 85px to pull the fade further out (more
       clearance); lower it to creep onto the card. Retune if the shadow's
       reach changes. */
    --overhang: clamp(0px, calc((100vw - var(--page-width, 1200px)) / 2), 220px);
    --fade: calc(var(--overhang) - 85px);
    overflow: hidden;
    position: relative;
    margin-inline: calc(var(--overhang) * -1);
}

/* Edge fade - same trick as the header scrim: a solid var(--bg) strip sits over
   the bleeding cards in each overhang, and a colour-matched box-shadow blooms
   inward from it. The shadow's Gaussian, browser-dithered falloff avoids the
   banding a mask gradient shows. The strip is a fixed --fade wide, pinned to
   each edge; the shadow (offset/blur/spread) is the part to tune by eye.
   pointer-events:none keeps drag/swipe working across the faded region. */
.gallery-scroller::before,
.gallery-scroller::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--fade);
    z-index: 2;
    background: var(--bg);
    pointer-events: none;
}

.gallery-scroller::before {
    left: 0;
    box-shadow: 15px -15px 30px 25px var(--bg);
}

.gallery-scroller::after {
    right: 0;
    box-shadow: -15px -15px 30px 25px var(--bg);
}

/* Under 1430px the carousel is narrow enough that the bleed + edge fades stop
   earning their keep - drop them so cards sit edge-to-edge, clipping at the
   viewport edge rather than the column edge. Zeroing --overhang removes the
   negative margin bleed (and the derived track padding / edge spacer); the fade
   strips are hidden. The scroller goes overflow:visible so off-screen cards
   spill past the column toward the screen edge - but then `main` clips them at
   the viewport so they don't widen the page (the bug `overflow: visible` alone
   caused). `clip` (not `hidden`) creates no scroll container, so it can't
   affect the sticky header (which lives outside `main` anyway). */
@media (max-width: 1429.98px) {
    .gallery-scroller {
        --overhang: 0px;
        overflow: visible;
    }
    .gallery-scroller::before,
    .gallery-scroller::after {
        display: none;
    }
    /* The body is padded by the safe-area insets (notch / rounded corners in
       landscape), so `main` - and with it this clip - would stop at the
       safe-area line and slice the cards there. Stretch main's box out to the
       physical screen edges with a negative margin, and pad it back by the
       same amount so nothing inside moves: only the clip edge changes, and
       cards now run under the safe area to the edge of the glass. */
    main:has(.gallery) {
        overflow-x: clip;
        margin-left: calc(-1 * env(safe-area-inset-left, 0px));
        margin-right: calc(-1 * env(safe-area-inset-right, 0px));
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }
}

/* Embla container - the flex track Embla translates on drag / arrow press.
   Left padding insets the first card to the column edge. A trailing
   .gallery-edge spacer does the same for the last card: Embla measures the
   scroll extent from the last slide, so the spacer (a real slide) is what
   lets trimSnaps land the last card inside the column rather than out in the
   right bleed. */
.gallery-track {
    display: flex;
    gap: 18px;
    padding-left: var(--overhang);
}

.gallery-card {
    flex: 0 0 clamp(220px, 60vw, 380px);
    min-width: 0;
    margin: 0;
}

/* Empty trailing slide - width is the overhang minus the flex gap that
   precedes it, so the last card lands at the column's right edge. */
.gallery-edge {
    flex: 0 0 max(0px, calc(var(--overhang) - 18px));
}

.gallery-card-photo {
    position: relative;
    /* 3:2 — the shape most of the photos already are, so few get cropped. */
    aspect-ratio: 3 / 2;
    border-radius: 14px;
    corner-shape: squircle;
    overflow: hidden;
}

/* The photo fills the card and crops to it. Per-image object-position (inline) keeps the subject in frame where
   the source isn't 3:2. Dragging the carousel must not start a native image
   drag, hence user-drag/select off (and draggable="false" in the markup). */
/* Each photo is a lightbox link (full-size original, grouped as one gallery
   so the viewer's next/prev walk the carousel). The anchor must fill the card
   or the image's height:100% has nothing to resolve against. */
.gallery-card-photo a {
    display: block;
    height: 100%;
    cursor: zoom-in;
    -webkit-user-drag: none;
}

.gallery-card-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

.gallery-card-meta {
    margin-top: 0.7em;
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Colophon (About this site), in the section's right column: a
   .card-heading above an elevated card holding a <dl> grid, where dt is the
   label and dd is the value, right-aligned. */

.about-specs .card-heading {
    font-size: 1.5em;
}

/* The Colophon rows and the links beneath read at the prose's own size
   (the shared .spec-list and .card-footer default a touch smaller). */
.about-specs .spec-list dt,
.about-specs .spec-list dd,
.about-specs .card-footer {
    font-size: 1em;
}

/* Below iPhone mini/SE width (375pt) the values get squeezed into several
   lines beside their labels at prose size, so each row stacks:
   label, then value beneath it, both left-aligned, with the hairline only
   between rows. Everything wider keeps the two columns; a value wrapping onto
   a second line there is fine. */
@media (max-width: 374.98px) {
    .about-specs .spec-list {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.1em;
    }
    .about-specs .spec-list dt {
        padding-right: 0;
    }
    .about-specs .spec-list dd {
        text-align: left;
    }
    .about-specs .spec-list dd:not(:first-of-type) {
        border-top: 0;
        padding-top: 0;
    }
    .about-specs .spec-list dd + dt {
        margin-top: 0.5em;
        padding-top: 0.6em;
    }
}

.about-specs {
    margin: 0;
    /* Hug the content height instead of stretching to match the prose column. */
    align-self: start;
}

.about-colophon {
    padding: 20px 28px;
    background: var(--bg-secondary);
    border-radius: 24px;
    corner-shape: squircle;
}

/* The <dl> itself is the shared .spec-list component (site.css). */

/* Mid widths (the "compressed" tablet band between the 720px single-column
   collapse and the full hero width). The portrait column is fluid (grows with
   the viewport) so the gap between the greeting and the photo stays ~constant
   instead of ballooning. Height tracks width via aspect-ratio (portrait is
   350:424 ≈ 0.825), keeping proportion at every size. */
@media (min-width: 720.02px) and (max-width: 1000px) {
    .about-intro {
        grid-template-columns: 1fr clamp(260px, 28vw, 320px);
    }
    .about-portrait img {
        width: 100%;
        height: auto;
        aspect-ratio: 350 / 424;
    }

    /* Tighten the column gutter - at this width the 2.5em gap between Currently
       and Previously reads as too much dead space. */
    .about-cols {
        gap: 1.5em;
    }
    .about-cols--work {
        column-gap: 3em;
    }

    /* Tablet portrait (iPad mini is 744px): the 35px page gutter leaves the
       prose stopping well short of the edge, and a 1fr timeline column (~160px)
       wraps "Web development" onto two lines. Pull the gutter in to 24px (the
       header's own padding at this width) and give the timeline a fixed 190px - enough for the longest h3 on
       one line - so the prose keeps its measure and slides into the freed
       margin instead of shrinking. (The footer keeps its own 20px padding.) */
    body:has(.about) {
        --container-pad: 24px;
    }
    .about-cols--narrow {
        grid-template-columns: 190px 1fr;
    }
}

@media (max-width: 720px) {
    /* The 48px desktop gutter above would otherwise carry down to phones. */
    body:has(.about) {
        --container-pad: 16px;
    }
    /* At 28px the label column plus the longest value (the repo URL, which can
       only break at its <wbr>s) outgrew the column and pushed past the gutter. */
    .about-colophon {
        padding: 16px 20px;
    }
    .about-intro {
        grid-template-columns: 1fr;
        gap: 1.25em;
        margin-bottom: 2.5em;
        /* Drop the oversized intro base (16.5pt) so the title/tagline/body
           scale down proportionally on a phone. */
        font-size: 16px;
    }
    .about-intro .page-title {
        font-size: 2.1em;
    }
    .about-tagline {
        font-size: 1.25em;
    }
    .about-portrait img {
        width: 220px;
        height: 267px;
    }
    .about-section-header h2 {
        font-size: 2.1em;
    }
    .about-cols {
        grid-template-columns: 1fr;
    }
    /* Hobby cards collapse to a single stacked column. */
    .hobby-grid {
        grid-template-columns: 1fr;
    }
    /* Touch users swipe; the arrows are desktop-only. */
    .gallery-nav {
        display: none;
    }
}
