* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Home page cards (projects, testimonials) share one look */
:root {
    --card-bg: #fff;
    --card-border: 1px solid #e6e6e6;
    --card-radius: 8px;
    --card-padding: 14px 16px;
}

/* Accent colour: links, card tags, card hover/focus borders, testimonial
   stripe. Change it here only. #2F6B4F on the site's light backgrounds is
   5.7-6.3:1 contrast (WCAG AA needs 4.5:1). */
:root {
    --accent: #2F6B4F;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: var(--font-body);             /* all headings */
}

body {
    font-family: var(--font-body);
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    /* No overflow-x here: html already clips horizontal overflow for the whole
       page. Setting overflow-x alone on body too made the browser auto-compute
       its overflow-y as a second, separate hidden scroll container nested
       inside the real viewport - window.scrollTo() could never reach it, which
       is why the page didn't land at the top when switching categories. */
    width: 100%;
    max-width: 100vw;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    /* No overflow-x here: html/body already clip horizontal overflow. Setting
       overflow-x alone on this element made the browser auto-compute overflow-y
       as a separate hidden scroll container, which the window.scrollTo(0) calls
       in script.js could never reach - that's what caused the scroll-position bug. */
    padding-top: 70px; /* space for fixed header */
}

/* Header */
.header {
    padding: 20px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
    padding-left: 0;
    position: relative;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

.home-btn {
    color: #333;
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    /* Taken out of the flex flow so it doesn't eat into the width .social-links
       centers within (that was pushing the nav links off-center to the right). */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 30px; /* Align with sidebar left edge (main-content padding) */
}

.home-btn:hover {
    background-color: #333;
    color: #fff;
}

.home-btn svg {
    width: 20px;
    height: 20px;
}

.social-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #333;
    color: #fff;
}

/* Round social icons (like the old site) */
.social-links {
    align-items: center;
}

.social-icon {
    width: 38px;
    height: 38px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s;
    flex-shrink: 0;
}

.social-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-icon:hover {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

/* Intro above the home grid */
.intro {
    text-align: center;
    padding: 40px 20px 10px;
    max-width: 900px;
    margin: 0 auto;
    text-wrap: balance; /* even line lengths - no lonely last word */
}

.intro-title {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 8px;
}

.intro-text {
    font-size: 17px;
    color: #666;
    line-height: 1.6;
}

.intro-currently {
    margin-top: 6px;
    font-size: 14px;
    color: #888;
}

.intro-currently[hidden] {
    display: none;
}

/* One sentence per line on desktop; each wraps evenly on its own on phones */
.intro-text span {
    display: block;
}

/* Section/article views fill the screen below the header, so no intro there */
.container:has(.main-content.content-view) .intro {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 300px 400px 300px;
    gap: 30px;
    padding: 30px;
    width: fit-content;
    align-items: start;
    margin: 0 auto;
    position: relative;
    transition: grid-template-columns 0.3s ease;
    max-width: 100%;
    /* The picture center is at 530px from grid start (300px sidebar + 30px gap + 200px half of center) */
    /* Grid total width: 300 + 30 + 400 + 30 + 300 = 1060px */
    /* Grid center is at 530px, which matches picture center, so margin: 0 auto centers both */
}

/* Expanded layout when showing content - all buttons on left, content on right */
.main-content.content-view {
    grid-template-columns: 300px 1fr;
    grid-template-rows: 1fr; /* single row takes full height so content-area can scroll inside */
    max-width: 1400px;
    width: 100%;
    min-height: 0; /* allow grid to shrink so content-area gets a real height */
    /* .main-content is a flex child of .container with flex:1 (flex-basis:0%)
       at the base level. On a tall window where the sidebar's content is
       shorter than the available viewport space, that flex-basis:0% let this
       grid container's own content-driven intrinsic size win out over height/
       max-height, shrinking it to fit the sidebar and leaving the content
       panel (and page background) visibly cut short of the viewport bottom.
       An explicit flex-basis here (no grow/shrink) gives it a reliable,
       content-independent height instead. */
    flex: 0 0 calc(100vh - 70px);
    max-height: calc(100vh - 70px); /* cap height so content panel scrolls, not the page */
    /* dvh = visible height excluding mobile browser bars (iOS Safari); older
       browsers ignore these and keep the vh values above. */
    flex: 0 0 calc(100dvh - 70px);
    max-height: calc(100dvh - 70px);
}

.main-content.content-view .sidebar-right {
    display: none;
}

.main-content:not(.content-view) .sidebar-left .sidebar-btn-right {
    display: none;
}

/* Sidebars */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    /* Grid items default to min-height:auto, so without this the sidebar's
       full content height (which can exceed the viewport) forces the whole
       grid row to grow to match it - and since .content-area sizes itself to
       100% of that same row, it was inheriting that oversized, unbounded
       height too, instead of being properly capped and independently
       scrollable. */
    min-height: 0;
}

/* Pic + heading float together at the top of the sidebar as the page is
   scrolled to reach lower buttons - top offset clears the fixed site header
   (70px) plus a bit of breathing room, matching the layout's existing 20px
   gap rhythm. Plain position:sticky, same approach as the mobile version, so
   the motion is native-smooth. */
.sidebar-left .sidebar-sticky-header {
    position: sticky;
    top: 90px;
    z-index: 5;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 24px;
    /* Forces its own compositing layer - without this, fast/abrupt scrolling
       could leave stale content briefly painted behind the sticky element. */
    will-change: transform;
}

/* Soft fade instead of a hard edge where the floating header ends and the
   scrollable button list begins - reads as "floating over", not "cut off". */
.sidebar-left .sidebar-sticky-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    background: linear-gradient(to bottom, #f5f5f5, transparent);
    pointer-events: none;
}

/* Profile image in sidebar (when content is shown) - capped height so it
   doesn't dominate the viewport, leaving more of the button list visible
   and legible as something you can scroll through. */
.sidebar .profile-image-container {
    width: 100%;
    margin-bottom: 0;
    padding: 12px; /* even white frame on all sides */
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Square crop for every section photo (portrait or landscape). Which part of
   the photo stays visible is set per category via `focus` in script.js
   (applied as inline object-position). */
.sidebar .profile-image,
.sidebar .sidebar-profile-image {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* Category header in sidebar */
.category-header-sidebar {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding: 15px 0;
    margin-bottom: 20px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

/* ---- Section/article view: one calm scroll per column ----
   The page itself doesn't scroll here (.main-content is exactly the viewport
   height below the header). The left column is its own compact scroll area -
   photo, title and buttons move together, so nothing slides under a pinned
   block and gets clipped - and the right panel scrolls on its own.
   overscroll-behavior stops a scroll that hits the end of one column from
   "chaining" into the page or the other column. */
.main-content.content-view .sidebar-left {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    gap: 8px;
    padding: 2px; /* keeps the photo frame's shadow from being clipped */
    /* No visible scrollbar (it sat on top of the buttons and looked clunky);
       still scrolls with trackpad/wheel. A soft edge fade (below) hints when
       there's more to scroll to. */
    scrollbar-width: none;
}

.main-content.content-view .sidebar-left::-webkit-scrollbar {
    display: none;
}

/* Edge fades, toggled by updateSidebarFade() in script.js only while there's
   actually more content above/below */
.main-content.content-view .sidebar-left.fade-bottom {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}

.main-content.content-view .sidebar-left.fade-top {
    -webkit-mask-image: linear-gradient(to top, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to top, #000 calc(100% - 40px), transparent);
}

.main-content.content-view .sidebar-left.fade-top.fade-bottom {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

/* Fixed-height flex column: don't let the buttons squash to fit */
.main-content.content-view .sidebar-left > * {
    flex-shrink: 0;
}

.main-content.content-view .sidebar-left .sidebar-sticky-header {
    position: static;
    gap: 12px;
    padding-bottom: 0;
    will-change: auto;
}

.main-content.content-view .sidebar-left .sidebar-sticky-header::after {
    display: none;
}

/* Wide, short 16:9 photo so photo + title + all 8 buttons usually fit
   without scrolling (same shape as the phone banner, so one `focus` per
   photo in script.js works for both) */
.main-content.content-view .sidebar .profile-image-container {
    padding: 8px;
}

.main-content.content-view .sidebar .profile-image,
.main-content.content-view .sidebar .sidebar-profile-image {
    aspect-ratio: 16 / 9;
}

.main-content.content-view .category-header-sidebar {
    padding: 2px 0 12px;
    margin-bottom: 4px;
}

/* Compact buttons; no sideways nudge on hover (it would be clipped by the
   scroll area's edge) */
.main-content.content-view .sidebar-btn {
    padding: 10px 20px;
    font-size: 16px;
}

.main-content.content-view .sidebar-btn:hover {
    transform: none;
}

.content-area.has-content {
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.sidebar-btn {
    padding: 25px 30px;
    background-color: #fff;
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s ease;
    color: #333;
    width: 100%;
    position: relative;
}


.sidebar-btn:hover {
    background-color: #333;
    color: #fff;
    transform: translateX(5px);
}

.sidebar-right .sidebar-btn:hover {
    transform: translateX(-5px);
}

.sidebar-btn.active {
    background-color: #333;
    color: #fff;
}

/* Home page: an emoji in front of each button label */
.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-emoji {
    flex: none;
    width: 1.5em;
    text-align: center;
    font-size: 1.2em;
    line-height: 1;
}

/* Tablet: the side columns are narrow, so "I do standup comedy" wraps to
   two lines - a fixed height keeps all 8 buttons the same size */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content:not(.content-view) .sidebar-btn {
        height: 66px;
        padding: 0 14px;
        gap: 10px;
        line-height: 1.2;
    }
}

/* Content Area */
.content-area {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    overflow-y: visible;
    max-height: none;
}

/* Content area when showing full content - use more screen space */
.content-area.has-content {
    max-height: calc(100vh - 100px);
    min-height: calc(100vh - 100px);
}

/* Home page - fixed size image container */
.content-area:not(.has-content) {
    width: 400px;
    height: 500px;
    min-height: 500px;
    max-height: 500px;
    padding: 20px;
    box-sizing: border-box;
}

/* Content view styles - content-area is the scroll container (header sticks inside this panel only) */
.content-area.has-content {
    align-items: stretch;
    justify-content: flex-start;
    padding: 30px;
    min-height: 0; /* allow grid item to shrink so it becomes the scroll container */
    height: 100%;
    max-height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Content viewer - just a flex wrapper; scrolling happens in content-area above */
.content-viewer {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: min-content; /* natural height so content-area scrolls */
}

.back-to-list-btn {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
    /* Elevated look now that it floats over content rather than sitting in a
       full-width bar - reads clearly as "a floating control", not a mistake. */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.back-to-list-btn:hover {
    background-color: #555;
    transform: translateX(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

/* Just the button floats (as a small pill with its own shadow) rather than a
   full-width bar - lighter, and title/date/source stay in normal flow below
   it instead of competing for permanent sticky space. */
/* Pinned as a clean white bar (not a pill floating over the text) with a soft
   fade underneath, so the article scrolls *under* it smoothly. top = minus the
   panel's padding, so it pins flush to the panel's top edge. */
.back-to-list-sticky {
    position: sticky;
    top: -30px;
    z-index: 10;
    margin: -10px 0 10px;
    padding: 10px 0;
    background-color: #fff;
    flex-shrink: 0;
    /* Forces its own compositing layer - without this, fast/abrupt scrolling
       could leave stale content briefly painted behind the sticky element. */
    will-change: transform;
}

.back-to-list-sticky::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 20px;
    background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0));
    pointer-events: none;
}

.item-content-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.item-content {
    width: 100%;
    padding: 12px 30px 30px 0;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* Style HTML content from files */
.item-full-content h1 {
    display: none; /* Hide h1 in content since we show title in sticky header */
}

.item-full-content h2 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.item-full-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-top: 25px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.item-full-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.item-full-content ul,
.item-full-content ol {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
    padding-left: 30px;
}

.item-full-content li {
    margin-bottom: 10px;
}

.item-full-content a {
    color: #333;
    text-decoration: underline;
}

.item-full-content a:hover {
    color: #000;
}

.item-full-content blockquote {
    border-left: 4px solid #333;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
}

.item-full-content figure {
    margin: 30px 0;
}

/* Photos inside articles */
.item-full-content img {
    display: block;
    max-width: 100%;
    max-height: 560px; /* tall portrait photos shouldn't fill the whole screen */
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

/* Photo beside the text (old-site posts): floats on wider screens,
   full width on phones */
@media (min-width: 600px) {
    .item-full-content figure.float-right,
    .item-full-content figure.float-left {
        width: 40%;
        max-width: 320px;
        margin-top: 6px;
        margin-bottom: 16px;
    }
    .item-full-content figure.float-right { float: right; margin-left: 24px; }
    .item-full-content figure.float-left { float: left; margin-right: 24px; }
}

/* Row of photos */
.item-full-content .article-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 30px 0;
    clear: both;
}

.item-full-content .article-gallery img {
    width: 100%;
    height: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

/* Embedded posts (Facebook / tweets): the wrapper keeps the aspect ratio */
.item-full-content .article-embed {
    position: relative;
    max-width: 550px;
    margin: 20px auto 30px;
}

.item-full-content .article-embed iframe {
    max-width: 100%;
}

.item-full-content cite {
    display: block;
    margin-top: 10px;
    font-size: 16px;
    color: #666;
    font-style: normal;
}

.item-full-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.item-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    padding-bottom: 0;
    font-size: 14px;
    color: #666;
}

.item-full-date {
    font-weight: 500;
}

.item-full-source {
    font-style: italic;
}

.item-full-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.item-full-content p {
    margin-bottom: 20px;
}

.item-full-content h1,
.item-full-content h2,
.item-full-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.item-full-description {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.item-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.external-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.external-link:hover {
    color: #666;
    text-decoration: underline;
}

.profile-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Home page profile image - fixed size */
.content-area:not(.has-content) .profile-image-container {
    width: 100%;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
}

.profile-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Crossfade layer for the cursor-tracking face (home page only) - sits
   exactly on top of #profileImage; see setFace() in script.js */
.content-area:not(.has-content) .profile-image-container {
    position: relative;
}

.content-area:not(.has-content) .profile-image.face-fade {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.content-area:not(.has-content) .profile-image.face-fade.show {
    opacity: 1;
}

/* Touch devices: the photo is tappable (face looks toward the tap) */
.touch-mode .content-area:not(.has-content) .profile-image-container {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* "psst… tap me" pill on the photo - touch devices only, fades after the
   first tap (see dismissFaceHint in script.js) */
.face-hint {
    display: none;
}

.touch-mode .content-area:not(.has-content) .face-hint {
    display: block;
    position: absolute;
    z-index: 2;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    animation: hintIn 0.4s ease;
    transition: opacity 0.4s ease;
}

/* Where the pill sits - it hops between these (corners keep the face clear) */
.face-hint.pos-bottom { left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; }
.face-hint.pos-top { left: 50%; top: 12px; transform: translateX(-50%); width: max-content; white-space: nowrap; }
.face-hint.pos-tl { top: 12px; left: 12px; }
.face-hint.pos-tr { top: 12px; right: 12px; }
.face-hint.pos-bl { bottom: 14px; left: 12px; }
.face-hint.pos-br { bottom: 14px; right: 12px; }
.face-hint:not(.pos-bottom) { white-space: nowrap; }

@keyframes hintIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.face-hint.hidden {
    opacity: 0;
}

/* Home page profile image - fixed dimensions with consistent padding */
.content-area:not(.has-content) .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

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

/* Category Header */
.category-header {
    padding: 20px;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

/* Content Items */
.content-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

/* "What people say" (top of I brag) */
.testimonials {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.testimonials-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.testimonial {
    margin: 0;
    padding: 20px 24px;
    border-left: 3px solid #333;
    border-radius: 0 8px 8px 0;
    background-color: #fafafa;
}

.testimonial blockquote {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    font-style: italic;
}

.testimonial blockquote::before { content: "“"; }
.testimonial blockquote::after { content: "”"; }

.testimonial figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.testimonial-name {
    font-weight: 600;
    color: #333;
}

.testimonial-name a {
    color: inherit;
}

.testimonial-role {
    color: #777;
}

/* End of an article: "💬 Discuss this on LinkedIn or X →" */
.item-discuss {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 15px;
    color: #555;
}

.item-discuss a {
    color: #333;
    font-weight: 600;
}

.content-item {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

.content-item:hover,
.content-item:focus-visible {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #333;
}

.content-item:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Optional small label above the title (Article / Poem / Thread ...) */
.item-tag {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
}

.item-title {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* "30 Dec 2024 · iamshilpi.com" */
.item-meta-line {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #666;
}

/* One-line summary, clamped to 2 lines */
.item-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin-top: 12px;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

/* Mobile content section layout helpers */
.mobile-section-hero {
    width: 100%;
    margin-bottom: 20px;
}

.mobile-section-image {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.mobile-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

/* Small confirmation message (e.g. "Email copied") */
.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%, 20px);
    background-color: #333;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 2000;
    max-width: calc(100vw - 32px);
    text-align: center;
}

.toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Footer - home page only (content view fills the screen with its own panel) */
.site-footer {
    text-align: center;
    padding: 20px 16px 30px;
    font-size: 14px;
    font-size: 13px;
    color: #888;
    display: flex;
    flex-wrap: wrap; /* very narrow phones: wraps neatly instead of overflowing */
    justify-content: center;
    align-items: center;
    gap: 4px 10px;
}

.site-footer a {
    color: #888;
    text-decoration: none;
}

.site-footer a:hover {
    color: #333;
    text-decoration: underline;
}

/* Footer, below-the-fold blocks and recognition line show on the home page only */
.main-content.content-view ~ .site-footer,
.main-content.content-view ~ .home-below {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 10px;
    }
    
    .home-btn {
        left: 20px;
    }
    
    /* Flexible columns: fixed 250/350/250px tracks plus gaps needed 930px,
       so on narrower windows the right sidebar was clipped off-screen. */
    .main-content {
        /* 300px photo column leaves the side columns room for
           "I do standup comedy" on one line down to ~769px */
        grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 1fr);
        width: 100%;
        gap: 20px;
        padding: 20px;
        max-width: 100%;
    }

    /* The home photo box was a fixed 400px - wider than its 350px column. */
    .content-area:not(.has-content) {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        min-height: 0;
        max-height: none;
    }
    
    .main-content.content-view {
        grid-template-columns: 250px 1fr;
        max-width: 100%;
    }

    .sidebar-btn {
        padding: 20px 16px;
        font-size: 16px;
    }
    
    .content-area {
        max-width: 100%;
    }

}

@media (max-width: 768px) {
    .header {
        padding: 15px 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .header-content {
        padding: 0;
        gap: 15px;
        justify-content: center;
    }
    
    .home-btn {
        left: 0;
        position: static;
        transform: none;
        margin-right: auto;
    }
    
    .social-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-icon {
        width: 34px;
        height: 34px;
    }

    .social-icon svg {
        width: 15px;
        height: 15px;
    }

    .social-link {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        transform: none;
        width: 100%;
        padding: 15px 10px;
        gap: 15px;
        max-width: 100vw;
    }
    
    /* Home page layout: photo on top, then all buttons below */
    .sidebar-left {
        order: 2;
    }

    .content-area {
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    /* :not(.has-content) has higher specificity than the plain .content-area rule
       above, so the 400x500 fixed home-page box must be overridden explicitly here
       or it wins on mobile and overflows the viewport. */
    .content-area:not(.has-content) {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 4 / 5;
        min-height: 0;
        max-height: none;
        margin: 0 auto;
    }

    .sidebar-right {
        order: 3;
    }

    .main-content.content-view {
        grid-template-columns: 1fr;
        /* Sidebars are hidden on mobile, so .content-area is the only grid item
           and must occupy the height-capped row (matching desktop) - "auto 1fr"
           let it auto-place into the unconstrained first row instead, which
           silently broke it as a scroll container (nothing to make position:
           sticky stick to, and the whole page scrolled instead of this panel). */
        grid-template-rows: 1fr;
    }

    .sidebar {
        flex-direction: column;
        overflow-x: visible;
        overflow-y: visible;
        padding-bottom: 0;
        gap: 15px;
    }

    .sidebar-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 15px;
    }

    .sidebar-left .profile-image-container {
        display: none;
    }
    
    .category-header-sidebar {
        display: none;
    }

    .content-area {
        min-height: 300px;
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .content-area.has-content {
        padding: 15px;
        display: block; /* Stack vertically on mobile content pages */
        align-items: flex-start;
        justify-content: flex-start;
    }

    /* On mobile content pages, hide both sidebars so only image + section + articles remain */
    .main-content.content-view .sidebar-left,
    .main-content.content-view .sidebar-right {
        display: none;
    }

    /* Mobile content page: ensure image, title, and articles stack vertically */
    .main-content.content-view .content-area {
        display: block;
    }

    /* The section photo scrolls away naturally with the list; only the
       section title stays pinned (a pinned photo + title took ~half the
       phone screen). Plain position:sticky, so the motion is native-smooth. */
    .main-content.content-view .mobile-section-title {
        position: sticky;
        top: -15px; /* = .content-area padding, so it pins flush to the panel top */
        z-index: 5;
        background-color: #fff;
        padding: 10px 0;
    }

    /* Soft fade under the pinned title instead of a hard edge */
    .main-content.content-view .mobile-section-title::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 16px;
        background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0));
        pointer-events: none;
    }

    .main-content.content-view .mobile-section-hero {
        width: 100%;
        margin-bottom: 20px;
    }

    .main-content.content-view .mobile-section-image {
        width: 100%;
        max-height: 240px;
        object-fit: cover;
        display: block;
        border-radius: 12px;
    }

    .main-content.content-view .mobile-section-title {
        width: 100%;
        display: block;
        margin-bottom: 20px;
    }

    .main-content.content-view .content-items {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    /* Hide right-side buttons on home view mobile */
    .main-content:not(.content-view) .sidebar-left .sidebar-btn-right {
        display: none;
    }
    
    .main-content.content-view .sidebar-right {
        display: none;
    }
    
    .main-content:not(.content-view) .sidebar-left .sidebar-btn-right {
        display: none;
    }
    
    .content-item {
        padding: 20px;
    }
    
    .item-title {
        font-size: 18px;
    }
    
    .item-description {
        font-size: 15px;
    }
    
    .item-full-title {
        font-size: 24px;
    }

    /* Article body lines up with its title (desktop's 30px right gutter
       isn't needed inside the narrow phone panel) */
    .item-content {
        padding: 12px 0 20px;
    }
    
    .item-full-content,
    .item-full-description {
        font-size: 16px;
    }
    
    .back-to-list-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .back-to-list-sticky {
        top: -15px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 8px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .header-content {
        flex-direction: row;
        gap: 10px;
        padding: 0 5px;
    }
    
    .home-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
        position: static;
        transform: none;
        left: auto;
    }
    
    .home-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .social-links {
        gap: 4px;
        flex: 1;
        justify-content: flex-end;
    }

    /* 7 icons + Resume must fit a 375px phone on one row */
    .social-icon {
        width: 30px;
        height: 30px;
    }

    .social-icon svg {
        width: 14px;
        height: 14px;
    }

    .social-link {
        font-size: 12px;
        padding: 5px 10px;
    }

    .intro {
        padding: 24px 16px 4px;
    }

    .intro-title {
        font-size: 24px;
    }

    .intro-text {
        font-size: 15px;
    }

    .main-content {
        padding: 10px 8px;
        gap: 12px;
        transform: none;
        width: 100%;
        max-width: 100vw;
    }

    /* Keep same order on small phones: photo first, then buttons */
    .sidebar-left {
        order: 2;
    }

    .content-area {
        order: 1;
        padding: 12px;
        min-height: 250px;
        width: 100%;
        max-width: 100%;
    }
    
    .content-area.has-content {
        padding: 12px;
        display: block; /* Stack vertically on mobile content pages */
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    /* Mobile content page: ensure image, title, and articles stack vertically */
    .main-content.content-view .content-area {
        display: block;
    }
    
    .main-content.content-view .mobile-section-hero {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .main-content.content-view .mobile-section-image {
        width: 100%;
        max-height: 200px;
        object-fit: cover;
        display: block;
        border-radius: 12px;
    }
    
    .main-content.content-view .mobile-section-title {
        width: 100%;
        display: block;
        margin-bottom: 20px;
        top: -12px; /* = .content-area padding at this size */
    }

    .main-content.content-view .content-items {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .sidebar-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 140px;
    }
    
    .content-item {
        padding: 15px;
    }
    
    .item-title {
        font-size: 16px;
    }
    
    .item-description {
        font-size: 14px;
    }
    
    .item-full-title {
        font-size: 20px;
    }
    
    .item-full-content,
    .item-full-description {
        font-size: 15px;
    }
    
    .item-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .item-content {
        padding: 12px 0 15px;
    }
    
    .back-to-list-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .back-to-list-sticky {
        top: -12px;
    }
}


/* ==== Design tweaks (preview branch) ==== */

/* 1. Comfortable reading width for articles (~70 characters a line) */
.item-content-header,
.item-content {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 2. Softer buttons: thin light border + rounded corners matching the cards;
      they darken on hover / when active as before */
.sidebar-btn {
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sidebar-btn:hover,
.sidebar-btn.active {
    border-color: #333;
}

/* 3. Back to List: light pill instead of a heavy black button */
.back-to-list-btn {
    background-color: #fff;
    color: #333;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.back-to-list-btn:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* 4. Phones: the 8 section buttons in two columns, so they show up right
      under the photo instead of a long single list */
@media (max-width: 768px) {
    .main-content:not(.content-view) .sidebar-btn {
        min-height: 52px;
        padding: 10px 12px;
        gap: 8px;
        line-height: 1.25;
    }
}

/* 5. One accent colour for links, tags and highlights (defined once in
      --accent at the top of this file); everything else stays greyscale */
.item-full-content a,
.item-discuss a,
.external-link,
.testimonial-name a {
    color: var(--accent);
}

.item-tag {
    color: var(--accent);
}

.testimonial {
    border-left-color: var(--accent);
}

.content-item:hover,
.content-item:focus-visible {
    border-color: var(--accent);
}

/* 6. Heading font: --font-heading (the body sans) for every heading */
.item-full-title,
.mobile-section-title,
.category-header-sidebar,
.testimonials-title,
.item-full-content h2,
.item-full-content h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Hero "Hi, I'm Shilpi": same sans, bold and bigger so it still leads the page */
.intro-title {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .intro-title {
        font-size: 30px;
    }
}


/* ==== Home: "Start here" tile, featured badge, overview ==== */

/* Tag + "★ Featured" side by side above a card title */
.item-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 6px;
}

.item-labels .item-tag {
    margin-bottom: 0;
}

.item-badge {
    color: var(--accent);
}

/* Home: the main area doesn't stretch, so the recognition line sits right under it */
.main-content:not(.content-view) {
    flex: none;
    padding-bottom: 12px;
}
/* Card grid: 3 columns desktop, 2 tablet, 1 phone */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.card-grid .content-item {
    height: 100%;
}

.main-content.content-view .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .card-grid,
    .main-content.content-view .card-grid {
        grid-template-columns: 1fr;
    }

}

/* Project card: thumbnail on top, text below */
.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #ececec;
}

.project-card-body {
    display: block;
    padding: 16px 20px 20px;
}

/* Until a real image is added: a quiet tile with the project's initial */
.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 600;
    color: #bbb;
    background-color: #ececec;
}

/* Off the clock: small media thumbnails */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.media-card {
    display: block;
    color: #333;
    text-decoration: none;
}

.media-card-thumb {
    display: flex;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease;
}

.media-card:hover .media-card-thumb,
.media-card:focus-visible .media-card-thumb {
    border-color: var(--accent);
}

.media-card-title {
    display: block;
    margin-top: 6px;
    font-size: 14px;
}

/* ==== Home split: header, "What I build" | photo | "Everything else" ==== */

/* Header: home + name on the left; Work, Resume and 3 small icons on the right */
.header .header-content {
    max-width: 1140px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 16px;
}

.header .home-btn {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    gap: 8px;
    padding: 6px 8px;
    margin-left: -8px;
}

.header .home-btn:hover {
    background-color: transparent;
    color: var(--accent);
}

.site-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.header-link:hover {
    color: var(--accent);
}

.header-icons,
.footer-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header .social-icon,
.site-footer .social-icon {
    width: 32px;
    height: 32px;
}

.header .social-icon svg,
.site-footer .social-icon svg {
    width: 15px;
    height: 15px;
}

.footer-icons {
    flex-basis: 100%;
    justify-content: center;
    margin-top: 6px;
}

.site-footer .social-icon {
    color: #666;
}

/* Visible keyboard focus everywhere on the new home elements */
.home-btn:focus-visible,
.header-link:focus-visible,
.social-icon:focus-visible,
.home-col-link:focus-visible,
.home-tile:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Home: tighter hero so everything fits one 1440x900 screen */
.intro {
    padding: 24px 20px 4px;
}

@media (min-width: 1025px) {
    .main-content:not(.content-view) {
        /* full size from 1200px wide; narrower laptops shrink the side columns (the photo stays 400px) instead of cutting off the right one */
        grid-template-columns: minmax(0, 340px) 400px minmax(0, 340px);
        padding-top: 18px;
    }
}

/* Which pieces show where:
   home -> "What I build" + "Everything else"; section pages -> the button menu */
.main-content:not(.content-view) .sidebar-left > .sidebar-btn {
    display: none;
}

.main-content.content-view .home-work,
.main-content.content-view .sidebar-right {
    display: none;
}

.home-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-col-heading {
    margin: 0 0 2px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.home-work-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* "What I build · see all →" - same look as the Off the clock captions */
.home-col-link {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 400;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.home-col-link::before {
    content: "·";
    margin-right: 6px;
    color: #333;
}

.home-col-link:hover {
    text-decoration: underline;
}

/* Compact project card (left column) */
.project-card--compact {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}

.project-card--compact .project-card-thumb {
    flex: none;
    width: 56px;
    height: 56px;
    aspect-ratio: 1;
    border-radius: 6px;
}

.project-card--compact .project-card-body {
    padding: 0;
    min-width: 0;
}

.project-card--compact .item-title {
    font-size: 16px;
}

.project-card--compact .item-meta-line {
    margin-top: 2px;
    font-size: 13px;
}

.project-card--compact .item-description {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.45;
}

/* Right column: lighter tiles, 2 per row */
.sidebar-right {
    gap: 12px;
}

.home-tiles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.main-content:not(.content-view) .sidebar-btn.home-tile {
    height: auto;
    min-height: 58px;
    padding: 10px 12px;
    gap: 8px;
    font-size: 14px;
    line-height: 1.25;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: none;
    color: #333;
}

.main-content:not(.content-view) .sidebar-btn.home-tile:hover,
.main-content:not(.content-view) .sidebar-btn.home-tile:focus-visible {
    transform: none;
    background-color: #fff;
    color: #333;
    border-color: var(--accent);
}

/* Tablet: narrower side columns -> one tile per row on the right */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content:not(.content-view) .home-tiles {
        grid-template-columns: 1fr;
    }
}

/* Phones: hero, photo, What I build, Everything else (2-col chips), recognition, footer */
@media (max-width: 768px) {
    .header .header-content {
        gap: 10px;
    }

    .header-nav {
        gap: 12px;
    }

    .header-icons {
        gap: 6px;
    }

}

@media (max-width: 480px) {
    /* not enough room for the name next to Work / Resume / icons */
    .site-name {
        display: none;
    }

    .header .social-icon {
        width: 30px;
        height: 30px;
    }
}


/* ==== Home split v2: list on the right, equal-height columns, below the fold ==== */

/* Desktop + tablet: all three columns top-aligned and the same height
   (the photo frame sets it); the two side lists spread to fill it */
@media (min-width: 769px) {
    .main-content:not(.content-view) {
        align-items: stretch;
    }

    .main-content:not(.content-view) .sidebar-left,
    .main-content:not(.content-view) .sidebar-right {
        display: flex;
        flex-direction: column;
    }

    .main-content:not(.content-view) .home-work {
        flex: 1;
    }

    /* project cards are as tall as their content (no stretched empty space) */
    .main-content:not(.content-view) .home-work-list {
        flex: 1;
        display: grid;
        grid-auto-rows: auto;
        align-content: start;
    }

    /* rows share the column's height so it ends level with the photo */
    .main-content:not(.content-view) .home-tiles {
        flex: 1;
        grid-auto-rows: 1fr;
    }

    .main-content:not(.content-view) .sidebar-btn.home-tile {
        min-height: 0;
    }
}

/* Right column, all screen sizes: a light single-column list, one section per row */
.main-content:not(.content-view) .home-tiles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid #e6e6e6;
}

.main-content:not(.content-view) .sidebar-btn.home-tile {
    min-height: 52px;
    padding: 0 6px;
    font-size: 15px;
    border: none;
    border-bottom: 1px solid #e6e6e6;
    border-radius: 0;
    background-color: transparent;
}

.main-content:not(.content-view) .sidebar-btn.home-tile:focus-visible {
    background-color: #fff;
    color: var(--accent);
    border-color: #e6e6e6;
}

/* hover highlight only with a real mouse (phones would leave the last tapped row lit) */
@media (hover: hover) {
    .main-content:not(.content-view) .sidebar-btn.home-tile:hover {
        background-color: #fff;
        color: var(--accent);
        border-color: #e6e6e6;
    }
}

@media (hover: none) {
    .main-content:not(.content-view) .sidebar-btn.home-tile:hover {
        background-color: transparent;
        color: #333;
    }
}

/* Below the fold */
/* Same 48px (phones: 40px) above every block: the top section's 12px
   bottom padding + the rest here, then the same gap between blocks */
.home-below {
    --home-rhythm: 48px;
    max-width: 1200px; /* same content width as the three columns above */
    margin: 0 auto;
    padding: calc(var(--home-rhythm) - 12px) 30px 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: var(--home-rhythm);
}

.home-below[hidden] {
    display: none;
}

.home-block-heading,
.section-block-heading {
    margin: 0 0 20px;
    line-height: 1.3;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Quote cards: up to 3 in a row, stacked on phones */
.quote-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.main-content.content-view .quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Home: as many columns as quotes (1 is centred, never an empty column) */
.home-below .quote-grid--1 {
    grid-template-columns: 1fr;          /* a single testimonial spans the row */
}

.home-below .quote-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-below .quote-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-card {
    margin: 0;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    background-color: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
}

.quote-card blockquote {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
    color: #333;
}

.quote-card blockquote::before { content: "“"; }
.quote-card blockquote::after { content: "”"; }

.quote-card figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.quote-name {
    font-weight: 600;
    color: #333;
}

.quote-name a {
    color: var(--accent);
}

.quote-name a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.quote-role {
    color: #777;
}

.section-quotes {
    margin-bottom: 10px;
}

/* Photos: borderless, cropped 4:5, tiny caption */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.photo-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.photo-card {
    display: block;
    color: #666;
    text-decoration: none;
}

.photo-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.photo-card:hover img {
    opacity: 0.88;
}

.photo-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.photo-caption {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.35;
    color: #333;
}

.photo-see-all {
    color: var(--accent);
}

@media (hover: hover) {
    .photo-card:hover .photo-see-all {
        text-decoration: underline;
    }
}

.photo-description,
.photo-card figcaption {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

figure.photo-card {
    margin: 0;
}

/* Recognition: 3 borderless columns with thin dividers; stacked with
   horizontal dividers on phones */
.recognition-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recognition-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 20px;
    border-left: 1px solid #e0e0e0;
    color: #333;
    text-decoration: none;
}

.recognition-card:first-child {
    padding-left: 0;
    border-left: 0;
}

a.recognition-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

@media (hover: hover) {
    a.recognition-card:hover .recognition-title {
        color: var(--accent);
    }
}

/* Same type scale as the project cards: small muted label, body-size title, small muted year */
.recognition-source {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
}

.recognition-title {
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
}

.recognition-year {
    font-size: 13px;
    color: #777;
}

@media (max-width: 1024px) {
    .quote-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-below {
        padding-left: 20px;
        padding-right: 20px;
    }

    .photo-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .quote-grid,
    .main-content.content-view .quote-grid,
    .home-below .quote-grid--2,
    .home-below .quote-grid--3 {
        grid-template-columns: 1fr;
    }

    .photo-strip {
        gap: 14px;
    }

    .recognition-grid {
        grid-template-columns: 1fr;
    }

    .recognition-card,
    .recognition-card:first-child {
        padding: 10px 0;
        border-left: 0;
        border-top: 1px solid #e0e0e0;
    }

    .recognition-card:first-child {
        padding-top: 0;
        border-top: 0;
    }

    /* same side padding as the top section */
    .home-below {
        --home-rhythm: 40px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 480px) {
    .home-below {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Very narrow phones: one photo per row */
@media (max-width: 359px) {
    .photo-strip {
        grid-template-columns: 1fr;
    }
}

/* Compact project cards: room for a 3-line outcome while the column still
   ends level with the photo */
.home-work .project-card,
.home-below .quote-card {
    padding: var(--card-padding);
    background-color: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-radius);
}

.project-card--compact .item-title {
    font-size: 15px;
}

.project-card--compact .item-description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.4;
}

/* ==== Home: one tile style (matches the hero photo frame) ====
   White, 8px radius, 20px padding, soft shadow, no border. Used by project
   cards, "Everything else" tiles, Recognition, testimonials and the
   Off the clock polaroids. Hover / keyboard focus: slight lift + accent label. */
:root {
    --tile-bg: #fff;
    --tile-radius: 8px;
    --tile-padding: 20px;
    --tile-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);          /* same as the photo frame */
    --tile-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.14);
    --tile-gap: 16px;                                     /* between tiles in every list/grid */
}

@media (max-width: 768px) {
    :root {
        --tile-padding: 16px;
        --tile-gap: 12px;
    }
}

.home-work .project-card,
.main-content:not(.content-view) .sidebar-btn.home-tile,
.recognition-card,
.home-below .quote-card,
.photo-strip .photo-card {
    background-color: var(--tile-bg);
    border: none;
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-work .project-card,
.recognition-card,
.home-below .quote-card {
    padding: var(--tile-padding);
}

/* One gap between tiles everywhere */
.main-content:not(.content-view) .home-work-list,
.main-content:not(.content-view) .home-tiles,
.recognition-grid,
.home-below .quote-grid,
.photo-strip {
    gap: var(--tile-gap);
}

/* "Everything else": 7 slim tiles, one per row, as tall as their label */
.main-content:not(.content-view) .home-tiles {
    border-top: none;
}

.main-content:not(.content-view) .sidebar-btn.home-tile {
    min-height: 48px;
    padding: 0 var(--tile-padding);
    border-bottom: none;
}

@media (min-width: 769px) {
    .main-content:not(.content-view) .home-tiles {
        grid-auto-rows: auto;
        align-content: start;
    }

    .main-content:not(.content-view) .sidebar-btn.home-tile {
        min-height: 48px;
    }
}

/* Recognition: 3 tiles in a row (stacked on phones), no dividers */
.recognition-card,
.recognition-card:first-child {
    border-left: none;
    padding: var(--tile-padding);
}

@media (max-width: 768px) {
    .recognition-card,
    .recognition-card:first-child {
        padding: var(--tile-padding);
        border-top: none;
    }
}

/* Off the clock: polaroids - photo inside a white frame, caption inside below it */
.photo-strip .photo-card {
    padding: 12px 12px 14px;
}

.photo-strip .photo-card img {
    border-radius: 3px;
}

.photo-strip .photo-card:hover img {
    opacity: 1;
}

.photo-strip .photo-caption {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .photo-strip .photo-card {
        padding: 8px 8px 10px;
    }

    .photo-strip .photo-caption {
        margin-top: 8px;
    }
}

/* Hover (real mouse only) and keyboard focus: lift + accent title/label */
.home-work .project-card:focus-visible,
.main-content:not(.content-view) .sidebar-btn.home-tile:focus-visible,
a.recognition-card:focus-visible,
.recognition-card--link:focus-visible,
.quote-card--link:focus-visible,
.photo-strip .photo-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    transform: translateY(-2px);
    box-shadow: var(--tile-shadow-hover);
    border-color: transparent;
    background-color: var(--tile-bg);
}

.home-work .project-card:focus-visible .item-title,
.main-content:not(.content-view) .sidebar-btn.home-tile:focus-visible,
a.recognition-card:focus-visible .recognition-title,
.recognition-card--link:focus-visible .recognition-title,
.photo-strip .photo-card:focus-visible .photo-caption {
    color: var(--accent);
}

@media (hover: hover) {
    .home-work .project-card:hover,
    .main-content:not(.content-view) .sidebar-btn.home-tile:hover,
    a.recognition-card:hover,
    .recognition-card--link:hover,
    .quote-card--link:hover,
    .photo-strip .photo-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--tile-shadow-hover);
        border-color: transparent;
        background-color: var(--tile-bg);
    }

    .home-work .project-card:hover .item-title,
    .main-content:not(.content-view) .sidebar-btn.home-tile:hover,
    a.recognition-card:hover .recognition-title,
    .recognition-card--link:hover .recognition-title,
    .photo-strip .photo-card:hover .photo-caption {
        color: var(--accent);
    }
}

/* Phones/tablets: a tapped tile keeps its white background */
@media (hover: none) {
    .main-content:not(.content-view) .sidebar-btn.home-tile:hover {
        background-color: var(--tile-bg);
        color: #333;
    }
}

/* ==== Home top section: 7 shared rows, three columns (desktop + tablet) ====
   Right: one section tile per row. Left: "I build stuff" in row 1, then each
   featured project spans two rows (2-3, 4-5, 6-7). Centre: the photo frame
   spans all seven. Rows are equal and grow to fit the longest text, so the
   top and bottom edges of all three columns always line up, the "I build
   stuff" tile is exactly as tall as a right-column tile, and every gap is the
   tile gap. (Side columns are subgrids of the main grid's rows.) */
@media (min-width: 769px) {
    .main-content:not(.content-view) {
        grid-template-rows: repeat(7, 1fr);
        column-gap: var(--tile-gap);
        row-gap: var(--tile-gap);
        align-items: stretch;
    }

    .main-content:not(.content-view) .sidebar-left,
    .main-content:not(.content-view) .sidebar-right,
    .main-content:not(.content-view) .content-area {
        grid-row: 1 / -1;
    }

    .main-content:not(.content-view) .sidebar-left,
    .main-content:not(.content-view) .sidebar-right {
        display: grid;
        grid-template-rows: subgrid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--tile-gap);
        min-height: 0;
    }

    /* their wrappers step aside so the tiles sit directly in the shared rows */
    .main-content:not(.content-view) .home-work,
    .main-content:not(.content-view) .home-work-list,
    .main-content:not(.content-view) .home-tiles {
        display: contents;
    }

    .main-content:not(.content-view) .home-work .tile {
        grid-row: span 2;
    }

    .main-content:not(.content-view) .sidebar-btn.home-tile {
        min-height: 0;
    }
}

/* Desktop: the photo frame grows with the row (at least 500px) instead of a
   fixed 500px, so the bottoms line up even when the project text runs longer;
   the photo is cropped to fill it */
@media (min-width: 1025px) {
    .main-content:not(.content-view) .content-area {
        height: auto;
        min-height: 500px;
        max-height: none;
    }
}

/* Featured projects sit flush under the "I build stuff" tile */
.main-content:not(.content-view) .home-work .tile {
    width: auto;
    margin-left: 0;
}

/* Phones: photo, then "I build stuff" + projects, then the section tiles */
@media (max-width: 768px) {
    .main-content:not(.content-view) .home-work {
        display: flex;
        flex-direction: column;
        gap: var(--tile-gap);
    }
}

/* ==== Section pages: one shared layout (matches the home page) ====
   Same edges as the header, no big white panel (tiles sit on the grey page),
   left nav as slim white tiles, section photo in the hero's white frame.
   Article pages keep their white reading panel (no .section-list). */
.main-content.content-view {
    max-width: 1200px;           /* 1140px of content + 30px padding = the header's edges */
    column-gap: var(--tile-gap);
}

@media (max-width: 1024px) {
    .main-content.content-view {
        max-width: 100%;
    }
}

/* Left column: room around the tiles for their shadows, without moving their edges */
.main-content.content-view .sidebar-left {
    gap: var(--tile-gap);
    margin: 0 -12px;
    padding: 4px 12px 16px;
}

.main-content.content-view .sidebar .profile-image-container {
    padding: 20px;
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
}

/* Left nav: slim white tiles; the current section is dark */
.main-content.content-view .sidebar-btn {
    min-height: 44px;
    height: auto;
    padding: 0 var(--tile-padding);
    font-size: 15px;
    line-height: 1.25;
    color: #333;
    background-color: var(--tile-bg);
    border: none;
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.main-content.content-view .sidebar-btn.active {
    background-color: #333;
    color: #fff;
}

.main-content.content-view .sidebar-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* The list: tiles straight on the grey page */
.content-area.has-content.section-list {
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    width: auto;
    max-width: none;
    margin: 0 -12px;             /* room for shadows; tile edges stay on the column edges */
    padding: 4px 12px 24px;
}

.section-list .content-items {
    gap: var(--tile-gap);
}

.section-list .content-item {
    background-color: var(--tile-bg);
    border: none;
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
    padding: var(--tile-padding);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* I brag: Recognition tiles + testimonial tiles, as on the home page */
.section-list .section-recognition,
.section-list .section-quotes {
    margin-bottom: 0;
}

.section-list .section-recognition + .section-quotes {
    margin-top: 32px;
}

.section-list .quote-card {
    background-color: var(--tile-bg);
    border: none;
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
    padding: var(--tile-padding);
}

.section-list .quote-grid {
    gap: var(--tile-gap);
}

.section-list .quote-grid--1 {
    grid-template-columns: minmax(0, 640px);
}

.section-list .section-block-heading {
    margin-bottom: 16px;
}

/* Hover (real mouse) and keyboard focus: lift + accent title, like the home page */
.section-list .content-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    transform: translateY(-2px);
    box-shadow: var(--tile-shadow-hover);
}

.section-list .content-item:focus-visible .item-title {
    color: var(--accent);
}

@media (hover: hover) {
    .main-content.content-view .sidebar-btn:not(.active):hover {
        transform: translateY(-2px);
        box-shadow: var(--tile-shadow-hover);
        background-color: var(--tile-bg);
        color: var(--accent);
    }

    .main-content.content-view .sidebar-btn.active:hover {
        background-color: #333;
        color: #fff;
    }

    .section-list .content-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--tile-shadow-hover);
        border-color: transparent;
    }

    .section-list .content-item:hover .item-title {
        color: var(--accent);
    }
}

@media (max-width: 1024px) {
    .section-list .recognition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phones: photo banner in a white frame, then the tiles on the grey page */
@media (max-width: 768px) {
    .content-area.has-content.section-list {
        margin: 0 -8px;
        padding: 0 8px 24px;
    }

    .section-list .mobile-section-hero {
        padding: 12px;
        background-color: var(--tile-bg);
        border-radius: var(--tile-radius);
        box-shadow: var(--tile-shadow);
    }

    .main-content.content-view .section-list .mobile-section-image {
        border-radius: 6px;
    }

    /* the pinned section title sits on the grey page now */
    .main-content.content-view .section-list .mobile-section-title {
        top: 0;
        background-color: #f5f5f5;
    }

    .main-content.content-view .section-list .mobile-section-title::after {
        background: linear-gradient(to bottom, #f5f5f5, rgba(245, 245, 245, 0));
    }

    .section-list .recognition-grid,
    .section-list .quote-grid,
    .section-list .quote-grid--1 {
        grid-template-columns: 1fr;
    }
}

/* ==== Section pages, final pass ==== */

/* Optional one-line intro at the top of the content column */
.section-intro {
    margin: 0 0 4px;
    font-size: 16px;
    color: #666;
}

/* One column of tiles at full content width */
.tile-list {
    display: flex;
    flex-direction: column;
    gap: var(--tile-gap);
}

/* The text tile: text on the left, optional 4:3 thumbnail on the right.
   Text always starts at the same left edge; no thumbnail = full width. */
.tile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tile-body {
    display: block;
    flex: 1;
    min-width: 0;
}

.tile-thumb {
    flex: none;
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

/* descriptions: up to 3 lines (the full text is on the detail page) */
.tile .item-description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Phones: thumbnail above the text, full tile width */
@media (max-width: 639px) {
    .tile.tile--has-thumb:not(.tile--compact) {
        flex-direction: column;
        align-items: stretch;
    }

    .tile:not(.tile--compact) .tile-thumb {
        order: -1;
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

/* Home "I build stuff": the same tile, smaller; thumbnail (when added) on the right */
.tile--compact {
    align-items: flex-start;
    gap: 12px;
}

.tile--compact .tile-thumb {
    width: 72px;
    height: 54px;
    border-radius: 4px;
}

/* I brag: Recognition and What people say blocks */
.section-list .section-recognition + .section-quotes {
    margin-top: 32px;
}

/* Detail pages (articles, case studies): "← All …" link, then one white tile */
.section-list .content-viewer {
    margin: 0;
    font-size: inherit;
    font-weight: 400;
    gap: var(--tile-gap);
}

.back-link {
    align-self: flex-start;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.article-tile {
    padding: 40px var(--tile-padding) 48px;
    background-color: var(--tile-bg);
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
}

@media (max-width: 768px) {
    .article-tile {
        padding: 24px var(--tile-padding) 32px;
    }
}


/* ==== One card type on every section page ==== */

/* Same type sizes as the home tiles */
.tile .item-title {
    font-size: 15px;
}

.tile .item-meta-line {
    margin-top: 2px;
    font-size: 13px;
}

.tile .item-description {
    margin-top: 6px;
    font-size: 13.5px;
    line-height: 1.45;
}

/* Never wider than the content column */
.tile-list,
.tile,
.tile-body {
    max-width: 100%;
    min-width: 0;
}

.tile .item-title,
.tile .item-description {
    overflow-wrap: anywhere;
}

/* Left photo + nav: no fade mask at the edges */
.main-content.content-view .sidebar-left.fade-top,
.main-content.content-view .sidebar-left.fade-bottom,
.main-content.content-view .sidebar-left.fade-top.fade-bottom {
    -webkit-mask-image: none;
    mask-image: none;
}

/* Detail page: the item's own images at full size */
.item-full-image {
    margin: 0 0 20px;
}

.item-full-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ==== Home final pass ==== */

/* Desktop: the top block spans the same 1140px as Recognition / Off the clock
   (side columns share the space left by the 400px photo column) */
@media (min-width: 1025px) {
    .main-content:not(.content-view) {
        width: 100%;
        max-width: 1200px;
        grid-template-columns: minmax(0, 1fr) 400px minmax(0, 1fr);
    }

    /* Scroll cue: the photo frame (and so the tiles beside it) is sized to the
       window, so the "Recognition" heading peeks in just above the bottom edge.
       100dvh - 310px = header + intro (~200px) + the section gap + the heading
       + a little air. The tiles grow it back if their text needs more room. */
    .main-content:not(.content-view) .content-area {
        min-height: clamp(420px, calc(100vh - 310px), 600px);
        min-height: clamp(420px, calc(100dvh - 310px), 600px);
    }

    /* the face photo fills whatever height the row ends up with, but its own
       size (900x1200) doesn't push the row taller */
    .main-content:not(.content-view) .content-area .profile-image-container {
        contain: size;
    }

    /* a little tighter so the projects' text fits the shorter rows */
    .home-work .tile {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* Same gap before the footer as between the sections */
.home-below {
    padding-bottom: 0;
}

.site-footer {
    --footer-gap: var(--home-rhythm, 48px);
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 16px;
    /* the divider spans the same width as the sections above */
    width: min(1140px, 100% - 60px);
    box-sizing: border-box;
    align-self: center;
    margin: 48px auto 0;
    padding: 24px 16px 48px;
    border-top: 1px solid #e0e0e0;
}

.footer-icons {
    flex-basis: auto;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0;
}

/* "© 2026 Shilpi Agrawal · Looking for my old site? →" - one small, muted line */
.footer-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 2px 8px;
    font-size: 12px;
    color: #999;
}

.site-footer .copyright,
.site-footer .footer-old {
    font-size: 12px;
    color: #999;
}

.site-footer .footer-old:hover {
    color: #555;
}

@media (max-width: 1024px) {
    .site-footer {
        width: calc(100% - 40px);
    }
}

@media (max-width: 768px) {
    .site-footer {
        width: calc(100% - 20px);
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .site-footer {
        width: calc(100% - 16px);
    }
}

/* Short desktop windows (e.g. 1280x800): 2-line project descriptions on the
   home page so the top block fits and "Recognition" still peeks in; the full
   text is on the I build stuff page */
@media (min-width: 1025px) and (max-height: 820px) {
    .home-work .tile .item-description {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Project pages: the role / place / dates line under the title */
.item-full-content .item-subtitle {
    margin-top: 0;
    font-size: 15px;
    color: #777;
}

/* Two phone screenshots side by side, uncropped */
.item-full-content .article-gallery.gallery-screens {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 480px;
}

.item-full-content .article-gallery.gallery-screens img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    max-height: none;
    border-radius: 6px;
    border: 1px solid #eee;
}


/* ==== Project pages (from the per-project content files) ==== */

/* "Link:" line under the role / dates line */
.item-full-content .item-link-line {
    margin-top: -8px;
    font-size: 15px;
}

/* Hero image at the top of the page: full reading width */
.item-full-content .item-hero img {
    width: 100%;
    max-height: none;
}

/* Captions under images */
.item-full-content figcaption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #777;
    text-align: center;
}

/* 1-3 images side by side, uncropped, with one caption under them */
.item-full-content .image-group-row {
    display: grid;
    grid-template-columns: repeat(var(--group-cols, 1), minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.item-full-content .image-group--2 { --group-cols: 2; }
.item-full-content .image-group--3 { --group-cols: 3; }

.item-full-content .image-group-row img,
.item-full-content .image-group-row video {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 6px;
}

/* a single image (e.g. a phone screenshot) stays a sensible size */
.item-full-content .image-group--1 .image-group-row {
    max-width: 360px;
    margin: 0 auto;
}

/* "Photos" section: a 2-column gallery, caption under each photo */
.item-full-content .photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
    align-items: start;
}

.item-full-content .photo-gallery figure {
    margin: 0;
}

.item-full-content .photo-gallery img {
    width: 100%;
    max-height: none;
    border-radius: 6px;
}

@media (max-width: 639px) {
    .item-full-content .image-group--3 .image-group-row,
    .item-full-content .photo-gallery {
        grid-template-columns: 1fr;
    }
}


/* ==== Pinned article title (desktop and phones) ====
   A zero-height sticky anchor at the top of the article tile; its bar fades in
   (script.js adds .is-visible) once the big title has scrolled out of view.
   It takes no space, so nothing in the article moves when it appears. */
.article-tile {
    position: relative;
}

.article-pin {
    position: sticky;
    top: -4px;                       /* = the panel's top padding, so it pins flush with its top edge */
    z-index: 10;
    height: 0;
    margin: -40px calc(-1 * var(--tile-padding)) 40px;   /* starts at the tile's top edge */
}

.article-pin-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px var(--tile-padding);
    background-color: var(--tile-bg);
    border-bottom: 1px solid #eee;
    border-radius: var(--tile-radius) var(--tile-radius) 0 0;
    box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.article-pin.is-visible .article-pin-bar {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.article-pin-back {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
    color: var(--accent);
    text-decoration: none;
}

.article-pin-title {
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.article-pin-back:focus-visible,
.article-pin-title:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .article-pin {
        top: 0;                      /* the panel has no top padding on phones */
        margin-top: -24px;
        margin-bottom: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-pin-bar,
    .article-pin.is-visible .article-pin-bar {
        transform: none;
        transition: none;
    }
}


/* ==== I paint: paintings shown large, captions underneath (no cards) ====
   Same white tile as everywhere else. Paintings are never cropped: each sits
   whole inside an equal-sized picture area, so tiles in a row line up.
   Paintings with progress / extra photos get one wide tile across both
   columns. 2 columns on desktop, 1 on phones. */
.paintings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row dense;      /* a wide tile never leaves a hole: the next painting fills it */
    gap: var(--tile-gap);
}

.painting {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 24px;
    background-color: var(--tile-bg);
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
}

/* equal picture area; the painting fits inside it whole */
.painting-frame {
    aspect-ratio: 4 / 5;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.painting-frame img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.painting figcaption {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* wide tile: full images side by side, sideways scroll when they don't fit */
.painting--wide {
    grid-column: 1 / -1;
}

.painting-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;            /* room for the scrollbar */
}

.painting-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.painting-shot {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-snap-align: start;
}

.painting-shot img {
    display: block;
    height: 380px;
    width: auto;
    max-width: none;
    border-radius: 4px;
}

.painting-shot-label {
    max-width: 280px;
    font-size: 12px;
    line-height: 1.4;
    color: #777;
}

/* phones: one column; wide tiles stack their photos top to bottom */
@media (max-width: 768px) {
    .paintings {
        grid-template-columns: minmax(0, 1fr);
    }

    .painting {
        padding: 16px;
        min-width: 0;
    }

    .painting-frame {
        aspect-ratio: auto;
        padding: 0;
    }

    /* progress photos: a swipeable strip (like home Recognition) -
       the next photo peeks in from the right */
    .painting-row {
        gap: 10px;
        padding-bottom: 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .painting-row::-webkit-scrollbar {
        display: none;
    }

    .painting-shot img {
        height: 300px;
        max-width: 78vw;
        object-fit: contain;
    }

    .painting-shot-label {
        max-width: 78vw;
    }
}


/* ==== I read/watch: grouped sections (no cards) ==== */
.readwatch {
    display: flex;
    flex-direction: column;
    gap: var(--tile-gap);
}

.rw-section {
    padding: 24px;
    background-color: var(--tile-bg);
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
}

.rw-heading {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.rw-text {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.rw-text:last-child {
    margin-bottom: 0;
}

.book-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.book {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #f0f0f0;
}

.book:first-child {
    padding-top: 4px;
    border-top: 0;
}

.book:last-child {
    padding-bottom: 0;
}

.book-cover {
    flex-shrink: 0;
    width: 56px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.book-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.book-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.book-author {
    font-size: 13px;
    color: #666;
}

.book-stars {
    margin-top: 2px;
    font-size: 14px;
    letter-spacing: 1px;
    color: #E0A100;
}

.book-stars-empty {
    color: #ddd;
}

.book-note {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: #444;
}

.rw-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.rw-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: #333;
    border-radius: var(--tile-radius);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.rw-button:hover {
    background-color: #555;
}

.rw-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .rw-section {
        padding: 16px;
    }

    .book-cover {
        width: 48px;
    }

    .rw-button {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* I read/watch: IMDb lists in the Watch section */
.rw-subheading {
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #555;
}

.watch-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
}

.watch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.watch-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.watch-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.watch-meta {
    font-size: 12px;
    color: #777;
}

.watch-rating {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #B07D00;
}

@media (max-width: 768px) {
    .watch-list {
        grid-template-columns: 1fr;
    }
}


/* ==== I do standup comedy: video + photo strip, then the story ==== */
.standup {
    display: flex;
    flex-direction: column;
    gap: var(--tile-gap);
}

.standup .section-intro {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.standup-videos {
    display: grid;
    gap: var(--tile-gap);
}

.standup-videos--2 {
    grid-template-columns: 2fr 1fr;     /* YouTube 16:9 beside a tall reel */
    align-items: start;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.video-frame--reel {
    aspect-ratio: 9 / 16;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 4 across on desktop, 2 on phones; same height, cropped evenly */
.standup-photos {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.standup-photo {
    margin: 0;
}

.photo-zoom-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
    cursor: zoom-in;
}

.photo-zoom-btn img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-zoom-btn:hover img {
    transform: scale(1.03);
}

.photo-zoom-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.standup-photo figcaption {
    margin-top: 6px;
    font-size: 12px;
    color: #777;
}

.standup-more {
    align-self: flex-start;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}

.standup-more:hover {
    text-decoration: underline;
}

.standup-more:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* enlarged photo */
.photo-zoom {
    margin: auto;            /* centre on screen (the global reset zeroes dialog margins) */
    max-width: min(92vw, 1000px);
    max-height: 88vh;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: var(--tile-radius);
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    cursor: zoom-out;
}

.photo-zoom::backdrop {
    background: rgba(0, 0, 0, 0.75);
}

.photo-zoom img {
    display: block;
    max-width: min(92vw, 1000px);
    max-height: 88vh;
    width: auto;
    height: auto;
}

.photo-zoom-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1;
    color: #333;
    cursor: pointer;
}

@media (max-width: 768px) {
    .standup-videos--2 {
        grid-template-columns: 1fr;
    }

    .standup-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* an odd last photo spans the row instead of sitting alone */
    .standup-photo:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .standup-photo:last-child:nth-child(odd) .photo-zoom-btn img {
        aspect-ratio: 4 / 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-zoom-btn img,
    .photo-zoom-btn:hover img {
        transition: none;
        transform: none;
    }
}


/* ==== I dance: YouTube performances, then reels ==== */
.dance-videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px var(--tile-gap);
}

.dance-video {
    margin: 0;
}

.dance-video:first-child {
    grid-column: 1 / -1;          /* the first performance large */
}

.dance-video figcaption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #666;
}

.dance-reels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tile-gap);
}

.dance-reel {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 6px;
    background: #111;
}

@media (max-width: 768px) {
    .dance-videos {
        grid-template-columns: 1fr;
    }

    .dance-reels {
        grid-template-columns: 1fr;
    }
}


/* ==== I brag: recognition card, recommendations, list ==== */
.brag-award {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brag-award-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.brag-award-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.brag-award-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 30px;
    border-radius: 50%;
    background: #FFF5D6;
}

.brag-award-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brag-award-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.brag-award-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: #333;
}

.brag-award-meta {
    font-size: 14px;
    color: #666;
}

.brag-award .standup-more {
    margin-top: 6px;
}

.brag-quotes-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brag-block-heading {
    margin: 8px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.brag-quotes {
    display: grid;
    grid-template-columns: 1fr;          /* one column, each quote full width */
    gap: var(--tile-gap);
    align-items: start;
}

.brag-quote {
    margin: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: var(--tile-bg);
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
}

.brag-quote blockquote {
    margin: 0;
}

.brag-quote-highlight {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 600;
    color: #333;
}

.brag-quote-full {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.brag-quote figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.brag-quote-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.brag-quote-role,
.brag-quote-context {
    font-size: 13px;
    color: #666;
}

.brag-quote-context {
    color: #888;
}

.brag-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brag-list li {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.brag-list a {
    color: var(--accent);
}

@media (max-width: 768px) {
    .brag-quotes {
        grid-template-columns: 1fr;
    }

    .brag-award-title {
        font-size: 19px;
    }
}


/* Home Recognition: a single item spans the row; with an image, picture beside the text */
.recognition-grid--1 {
    grid-template-columns: 1fr;
}

.recognition-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recognition-card--image {
    display: grid;
    grid-template-columns: minmax(0, 320px) 1fr;
    align-items: center;
    gap: 20px;
}

.recognition-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.recognition-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recognition-card--image .recognition-title {
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .recognition-card--image {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* a single wide screenshot (e.g. a desktop app view): more room than a phone screenshot */
.item-full-content .image-group--wide .image-group-row {
    max-width: 600px;
}

/* "· see all →" next to a home block heading (same muted caption style as the photo strip) */
.home-block-more {
    margin-left: 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.home-block-more:hover {
    text-decoration: underline;
}

.home-block-more:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}


/* ==== Testimonials (home + I brag): full quote in italics, in quotes, with a
   soft oversized quote mark; no highlighted excerpt ==== */
.quote-card,
.brag-quote {
    position: relative;
    overflow: hidden;
}

.quote-card::before,
.brag-quote::before {
    content: "“";
    position: absolute;
    top: -6px;
    left: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 88px;
    line-height: 1;
    color: var(--accent);
    opacity: 0.14;
    pointer-events: none;
}

.quote-card blockquote,
.brag-quote-text {
    position: relative;
    margin: 0;
    padding-top: 18px;
    font-size: 15.5px;
    line-height: 1.75;
    font-style: italic;
    color: #3a3a3a;
}

.brag-quote-text::before { content: "“"; }
.brag-quote-text::after { content: "”"; }

.quote-card figcaption {
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.quote-context {
    font-size: 13px;
    color: #999;
}


/* ==== I travel: a tile per place, photos in an even grid ==== */
.travel-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.travel-when {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.travel-photos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.travel-place .rw-text + .travel-photos {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .travel-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Quote marks: one big opening mark top-left and a matching closing mark
   bottom-right (no small inline marks on top of them) */
.quote-card blockquote::before,
.quote-card blockquote::after,
.brag-quote-text::before,
.brag-quote-text::after {
    content: none;
}

.quote-card::after,
.brag-quote::after {
    content: "”";
    position: absolute;
    right: 16px;
    bottom: -34px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 88px;
    line-height: 1;
    color: var(--accent);
    opacity: 0.14;
    pointer-events: none;
}

/* closing mark sits at the end of the quote text, not over the attribution */
.quote-card::after,
.brag-quote::after {
    content: none;
}

.quote-card blockquote,
.brag-quote-text {
    padding-bottom: 34px;
}

.quote-card blockquote::after,
.brag-quote-text::after {
    content: "”";
    position: absolute;
    right: 0;
    bottom: -22px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 88px;
    font-style: normal;
    line-height: 1;
    color: var(--accent);
    opacity: 0.14;
    pointer-events: none;
}

/* Testimonials, final: no oversized floating marks. Real “ ” inline with the
   italic text, and a thin accent bar on the left of the quote. */
.quote-card::before,
.quote-card::after,
.brag-quote::before,
.brag-quote::after {
    content: none;
}

.quote-card blockquote,
.brag-quote-text {
    padding: 0 0 0 16px;
    border-left: 3px solid var(--accent);
}

.quote-card blockquote::before,
.brag-quote-text::before {
    content: "“";
    position: static;
    font: inherit;
    opacity: 1;
    color: inherit;
}

.quote-card blockquote::after,
.brag-quote-text::after {
    content: "”";
    position: static;
    font: inherit;
    opacity: 1;
    color: inherit;
}

/* wide images (slides, charts): stacked on phones so they stay readable */
@media (max-width: 639px) {
    .item-full-content .image-group--stack-phone .image-group-row {
        grid-template-columns: 1fr;
    }
}

/* a tall hero (e.g. a phone wireframe): capped height, shown whole */
.item-hero--tall img {
    max-height: 520px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}


/* ==== I write: Collection of My Tweets ==== */
.item-full-content .tweet-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 8px;
}

.item-full-content .tweet {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid #e8e8e8;
    border-radius: var(--tile-radius);
    background: #fff;
}

.item-full-content .tweet blockquote {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.item-full-content .tweet img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 360px;
    margin-top: 12px;
    border-radius: 6px;
}

.item-full-content .tweet figcaption {
    margin-top: 10px;
    font-size: 13px;
    text-align: left;
}

.item-full-content .tweet figcaption a {
    color: #888;
    text-decoration: none;
}

.item-full-content .tweet figcaption a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.item-full-content .tweet blockquote {
    padding: 0;
    border: 0;
    font-style: normal;
}

.item-full-content .tweet blockquote::before,
.item-full-content .tweet blockquote::after {
    content: none;
}

/* detailed diagrams: one per row, full width of the article */
.item-full-content .image-group--full .image-group-row {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* counts under each tweet, like X: replies, reposts, likes, bookmarks, views */
.item-full-content .tweet-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 12px;
    font-size: 13px;
    color: #777;
}

.item-full-content .tweet-stats > span {
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* X profile card at the top of the tweets page (whole card links to the profile) */
.item-full-content .x-profile {
    display: block;
    margin-bottom: 24px;
    border: 1px solid #e8e8e8;
    border-radius: var(--tile-radius);
    overflow: hidden;
    color: #333;
    text-decoration: none;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.item-full-content .x-profile:hover {
    box-shadow: var(--tile-shadow-hover);
}

.item-full-content .x-profile:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.item-full-content .x-profile-banner img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    border-radius: 0;
    max-height: none;
}

.item-full-content .x-profile-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 18px 18px;
}

.item-full-content .x-profile-avatar {
    width: 84px;
    height: 84px;
    margin-top: -42px;
    margin-bottom: 6px;
    border: 4px solid #fff;
    border-radius: 50%;
    object-fit: cover;
}

.item-full-content .x-profile-name {
    font-size: 18px;
    font-weight: 700;
}

.item-full-content .x-profile-handle,
.item-full-content .x-profile-meta {
    font-size: 14px;
    color: #777;
}

.item-full-content .x-profile-bio {
    margin: 6px 0 4px;
    font-size: 15px;
    line-height: 1.5;
}

.item-full-content .x-profile-meta strong {
    color: #333;
}

.item-full-content .x-profile-cta {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.item-full-content .x-profile-avatar {
    align-self: flex-start;
    margin-left: 0;
    margin-right: 0;
}

/* Recognition: Shilpi's own line about the award, in italics under the title */
.recognition-note {
    display: block;
    margin: 8px 0 4px;
    font-size: 14px;
    font-style: italic;
    line-height: 1.5;
    color: #555;
}

/* Phones: "←" on the pinned section title goes back home (big enough to tap) */
.section-back {
    display: none;
}

@media (max-width: 768px) {
    .main-content.content-view .mobile-section-title {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .section-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: -8px;
        flex-shrink: 0;
        font-size: 24px;
        font-weight: 400;
        color: var(--accent);
        text-decoration: none;
        border-radius: 50%;
    }

    .section-back:active {
        background-color: rgba(0, 0, 0, 0.06);
    }
}

/* Pinned article bar: "← I build stuff" is a proper back button, the title sits after it */
.article-pin-back {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    padding: 8px 10px 8px 0;
    margin: -8px 0;
    border-right: 1px solid #e5e5e5;
}

.article-pin-title {
    color: #666;
    font-weight: 500;
}

/* Phones (one column): photo, then all 8 section tiles, then the featured projects.
   The left column's wrappers step aside so their pieces can be reordered. */
@media (max-width: 768px) {
    .main-content:not(.content-view) .sidebar-left,
    .main-content:not(.content-view) .home-work {
        display: contents;
    }

    .main-content:not(.content-view) .home-build-tile { order: 2; }
    .main-content:not(.content-view) .sidebar-right   { order: 3; }
    .main-content:not(.content-view) .home-work-list  { order: 4; display: flex; flex-direction: column; gap: var(--tile-gap); margin-top: 12px; }
}

/* Phones: home photo frame. The frame's height comes from the photo itself
   (4:5), not from percentage heights, so iPhone Safari keeps the same white
   border on all four sides. */
@media (max-width: 768px) {
    .main-content:not(.content-view) .content-area:not(.has-content) {
        max-width: none;   /* same width as the tiles below */
        height: auto;
        aspect-ratio: auto;
        min-height: 0;
        max-height: none;
    }

    .main-content:not(.content-view) .content-area:not(.has-content) .profile-image-container {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .main-content:not(.content-view) .content-area:not(.has-content) .profile-image {
        width: 100%;
        height: 100%;
    }
}

/* ==== Recognition photo strip (home card + I brag) ====
   Two small pictures at one height, never cropped. Desktop: on the home card
   they sit left of the text; on I brag they're a short row above it.
   Phones: a swipeable strip (the second picture peeks in from the right). */
.recognition-card--image {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.recognition-card--image .recognition-text {
    flex: 1;
    min-width: 0;
}

.recognition-strip {
    flex: none;
    display: flex;
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.recognition-strip::-webkit-scrollbar {
    display: none;
}

.recognition-strip img {
    flex: none;
    display: block;
    height: 200px;
    width: auto;
    border-radius: 6px;
    scroll-snap-align: start;
    user-select: none;
    -webkit-user-drag: none;
}

.recognition-strip--large img {
    height: 220px;
}


/* medium screens: pictures above the text so the text isn't squeezed */
@media (max-width: 1024px) {
    .recognition-card--image {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .recognition-strip img,
    .recognition-strip--large img {
        height: 170px;
    }

    /* I brag on phones: the pictures already say "award", so no trophy
       circle - the text gets the full width */
    .brag-award {
        gap: 14px;
    }

    .brag-award-icon {
        display: none;
    }

    .brag-award-title {
        font-size: 18px;
    }

    .brag-award .recognition-note {
        margin: 4px 0 0;
    }
}

/* Home Recognition card: the card opens I brag; this link opens the article */
.recognition-card--link {
    cursor: pointer;
}

.recognition-ext {
    align-self: flex-start;
    margin-top: 10px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.recognition-ext:hover {
    background-color: var(--accent);
    color: #fff;
}

.recognition-ext:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Phones, section pages: the pinned "← I write" bar sits right under the top
   header (no grey gap) and is more compact, so together they take less room. */
@media (max-width: 768px) {
    .main-content.content-view {
        padding-top: 0;
    }

    /* the phone header is 55px tall, not 70 */
    .container:has(.main-content.content-view) {
        padding-top: 55px;
    }

    .main-content.content-view {
        flex: 0 0 calc(100vh - 55px);
        max-height: calc(100vh - 55px);
        flex: 0 0 calc(100dvh - 55px);
        max-height: calc(100dvh - 55px);
    }

    .main-content.content-view .section-list .mobile-section-hero {
        margin-top: 12px;
    }

    .main-content.content-view .section-list .mobile-section-title {
        font-size: 22px;
        padding: 6px 0;
        margin-bottom: 12px;
    }

    .section-back {
        width: 34px;
        height: 34px;
        font-size: 21px;
    }
}

/* ==== Home: quieter links (no repeated "see all") ====
   Off the clock: the whole photo card is the link, so its caption is just
   "🎨 I paint" with a small arrow on the right.
   What people say: one "More in I brag →" link, right-aligned on the heading row. */
.photo-strip .photo-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.photo-label {
    min-width: 0;
}

.photo-arrow {
    flex-shrink: 0;
    color: #999;
    transition: transform 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
    .photo-strip .photo-card:hover .photo-arrow {
        color: var(--accent);
        transform: translateX(3px);
    }
}

.photo-strip .photo-card:focus-visible .photo-arrow {
    color: var(--accent);
}

.home-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 20px;
}

.home-block-head .home-block-heading {
    margin: 0;
}

.home-block-head .home-block-more {
    margin-left: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Home "What people say" card opens I brag at the quotes */
.quote-card--link {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* landing spot when coming from a home card (clears the pinned title on phones) */
.brag-quotes-block {
    scroll-margin-top: 8px;
}

@media (max-width: 768px) {
    .brag-quotes-block {
        scroll-margin-top: 56px;
    }
}

/* I brag: the external links are the same outlined pill as on home */
.standup .recognition-ext {
    display: inline-block;
}


/* ==== Inside pages scroll as one normal page ====
   Section and article pages used to scroll inside their own panel; now the
   whole page scrolls (like home), so the footer spans the full width at the
   very bottom. The left menu (desktop) and the "← I write" / article bars
   stay pinned under the header. */
:root {
    --header-h: 70px;   /* script.js keeps this equal to the real header height */
}

.main-content.content-view {
    flex: 1 0 auto;
    max-height: none;
    min-height: 0;
    grid-template-rows: auto;
    align-items: start;
}

.content-area.has-content {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.main-content.content-view ~ .site-footer {
    display: flex;
}

/* desktop: the left menu stays in view while the page scrolls */
@media (min-width: 769px) {
    .main-content.content-view .sidebar-left {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        height: auto;
        max-height: calc(100vh - var(--header-h) - 32px);
        max-height: calc(100dvh - var(--header-h) - 32px);
        overflow-y: auto;
        align-self: start;
    }

    .article-pin {
        top: var(--header-h);
    }
}

@media (max-width: 768px) {
    .main-content.content-view {
        flex: 1 0 auto;
        max-height: none;
    }

    .main-content.content-view .mobile-section-title,
    .main-content.content-view .section-list .mobile-section-title {
        top: var(--header-h);
    }

    .article-pin {
        top: var(--header-h);
    }
}

/* landing spot from a home card: clear the header (and the pinned title on phones) */
.brag-quotes-block {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

@media (max-width: 768px) {
    .brag-quotes-block {
        scroll-margin-top: calc(var(--header-h) + 56px);
    }
}

/* ==== I brag: "More things I'm proud of" as tiles ==== */
.proud-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proud-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tile-gap);
}

.proud-tile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background-color: var(--tile-bg);
    border-radius: var(--tile-radius);
    box-shadow: var(--tile-shadow);
    min-width: 0;
}

/* tiles with smaller cards inside take the full width */
.proud-tile:has(.proud-parts) {
    grid-column: 1 / -1;
}

.proud-parts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.proud-part {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #ececec;
    border-radius: 8px;
    min-width: 0;
}

.proud-link {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
    .proud-tile.proud-link:hover {
        transform: translateY(-2px);
        box-shadow: var(--tile-shadow-hover);
    }

    .proud-part.proud-link:hover {
        border-color: #d6d6d6;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .proud-link:hover .proud-title {
        color: var(--accent);
    }

    .proud-link:hover .proud-arrow {
        transform: translateX(3px);
    }
}

.proud-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.proud-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    background-color: #f3f3f3;
}

.proud-video,
.proud-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f3f3f3;
}

.proud-embed--tall {
    aspect-ratio: auto;
    height: 420px;
}

.proud-video iframe,
.proud-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.proud-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.proud-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.proud-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: #333;
}

.proud-part .proud-title {
    font-size: 15px;
}

.proud-arrow {
    display: inline-block;
    color: #999;
    transition: transform 0.15s ease;
}

.proud-desc {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: #555;
}

.proud-quote {
    margin: 4px 0 0;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    font-size: 14px;
    font-style: italic;
    line-height: 1.55;
    color: #444;
}

.proud-quote cite {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-style: normal;
    color: #888;
}

.proud-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proud-links .recognition-ext {
    margin-top: 6px;
}

@media (max-width: 1024px) {
    .proud-parts {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .proud-tiles {
        grid-template-columns: minmax(0, 1fr);
    }

    .proud-tile {
        padding: 16px;
    }
}

/* every "proud" tile is full width; on desktop a tile with one picture/video
   puts it on the left and the text on the right */
.proud-tiles {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 769px) {
    .proud-tile.has-media {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 24px;
    }
}

/* Cards inside a tile (Speaking, Mentoring): one per row, picture left and
   text right on desktop - big enough to read */
.proud-parts,
.proud-parts--2,
.proud-parts--3 {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 769px) {
    .proud-part.has-media {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 24px;
        padding: 16px;
    }

    .proud-part .proud-title {
        font-size: 17px;
    }
}

.proud-image-link {
    display: block;
    border-radius: 6px;
}

.proud-image-link .proud-image {
    border: 1px solid #eee;
    transition: box-shadow 0.15s ease;
}

@media (hover: hover) {
    .proud-image-link:hover .proud-image {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }
}

.proud-image-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* slides and event cards: show the whole image, not a crop */
.proud-image-link .proud-image {
    object-fit: contain;
    background-color: #fff;
}

/* tall pictures (Topmate posters and review cards): whole picture, not too tall */
.proud-image--portrait {
    aspect-ratio: auto;
    width: auto;
    max-width: 100%;
    max-height: 380px;
    margin: 0 auto;
    object-fit: contain;
    background: none;
}

.proud-image-link:has(.proud-image--portrait) {
    display: flex;
    justify-content: center;
}

.proud-image-link .proud-image--portrait {
    border: 0;
}

/* a row of review cards that scrolls sideways when it doesn't fit */
.proud-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.proud-gallery::-webkit-scrollbar {
    display: none;
}

.proud-gallery img {
    flex: none;
    height: 260px;
    width: auto;
    border-radius: 8px;
    scroll-snap-align: start;
}

@media (max-width: 768px) {
    .proud-gallery img {
        height: 220px;
    }

    .proud-image--portrait {
        max-height: 340px;
    }
}

/* Mentoring: a row of picture cards with captions - a grid on desktop,
   a swipeable row on phones. Pictures sit whole on a soft background. */
.proud-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.proud-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #333;
    text-decoration: none;
}

.proud-card-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    padding: 10px;
    background-color: #f5f3ee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.proud-card-pic img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.proud-card-caption {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.proud-card-caption span {
    color: #999;
}

@media (hover: hover) {
    .proud-card:hover .proud-card-pic {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }

    .proud-card:hover .proud-card-caption,
    .proud-card:hover .proud-card-caption span {
        color: var(--accent);
    }
}

.proud-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .proud-cards {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .proud-cards::-webkit-scrollbar {
        display: none;
    }

    .proud-card {
        flex: 0 0 70%;
        scroll-snap-align: start;
    }
}

/* photo cards (not posters): fill the frame */
.proud-card-pic--photo,
.proud-card-pic:has(img[src*="nirmaan"]),
.proud-card-pic:has(img[src*="evidyaloka"]) {
    padding: 0;
    aspect-ratio: 4 / 3;
}

.proud-card-pic:has(img[src*="nirmaan"]) img,
.proud-card-pic:has(img[src*="evidyaloka"]) img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
}

/* I brag: "Recognition" heading above the award tile, like the other blocks */
.brag-award-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==== Photo carousel (Volunteering): big photos, one at a time ==== */
.proud-carousel {
    position: relative;
}

.proud-cards.proud-cards--carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.proud-cards--carousel::-webkit-scrollbar {
    display: none;
}

.proud-cards--carousel .proud-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
}

.proud-cards--carousel .proud-card-pic {
    aspect-ratio: 16 / 10;
}

.proud-cards--carousel .proud-card-caption {
    font-size: 15px;
}

.carousel-btn {
    position: absolute;
    top: calc(50% - 30px);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 26px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.carousel-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .proud-cards--carousel .proud-card {
        flex: 0 0 86%;
    }

    /* phones swipe; no buttons */
    .carousel-btn {
        display: none;
    }
}

/* a tile that's only a group of cards (Speaking) needs no empty text area */
.proud-text:empty {
    display: none;
}

/* Mentoring: posters and review cards in one row, three at a time */
.proud-cards--carousel.proud-cards--small .proud-card {
    flex: 0 0 calc((100% - 32px) / 3);
}

.proud-cards--carousel.proud-cards--small .proud-card-pic {
    aspect-ratio: 4 / 5;
}

.proud-cards--small ~ .carousel-btn {
    top: calc(50% - 24px);
}

@media (max-width: 768px) {
    .proud-cards--carousel.proud-cards--small .proud-card {
        flex: 0 0 72%;
    }
}

/* landing spot for a quote opened from home */
.brag-quote {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

@media (max-width: 768px) {
    .brag-quote {
        scroll-margin-top: calc(var(--header-h) + 56px);
    }
}

/* ==== Article pictures: zoom, stacks, scroll frames, carousels (the startup and onward) ==== */
.item-full-content img.zoomable {
    cursor: zoom-in;
}

/* the line under the title, a little more prominent */
.item-full-content .item-subtitle--strong {
    font-size: 17px;
    font-weight: 500;
    color: #444;
}

/* small muted note after a sub-heading, e.g. "(same for Web/Android/iOS)" */
.item-full-content .h-note {
    font-weight: 400;
    font-size: 0.85em;
    color: #888;
}

.item-full-content h4 {
    margin: 32px 0 8px;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

/* pictures one under the other, each full width */
.item-full-content .image-group--stack .image-group-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.item-full-content .image-group--stack img,
.item-full-content .image-group--full img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

/* one tall, detailed screen: big, centred */
.item-full-content .image-group--tall .image-group-row,
.item-full-content .image-group--single .image-group-row {
    display: flex;
    justify-content: center;
}

.item-full-content .image-group--tall img {
    width: min(100%, 560px);
    height: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

.item-full-content .image-group--single img {
    width: min(100%, 380px);
    height: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

/* a tall phone screen shown big, in a frame you scroll inside */
.item-full-content .image-scroll-frame {
    max-height: 620px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 -16px 16px -16px rgba(0, 0, 0, 0.15);
}

.item-full-content .image-scroll-frame img {
    display: block;
    width: min(100%, 620px);
    height: auto;
    margin: 0 auto;
}

/* sideways-scrolling row of screens */
.item-full-content .image-carousel-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.item-full-content .image-carousel-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 300px;
    scroll-snap-align: start;
}

.item-full-content .image-carousel-item--wide {
    width: min(85%, 640px);
}

.item-full-content .image-carousel-item img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
}

.item-full-content .image-carousel-caption {
    font-size: 13px;
    line-height: 1.4;
    color: #777;
}

@media (max-width: 768px) {
    .item-full-content .image-scroll-frame {
        max-height: 70vh;
    }

    .item-full-content .image-carousel-item {
        width: 78%;
    }

    .item-full-content .image-carousel-item--wide {
        width: 90%;
    }

    .item-full-content .image-carousel-item img {
        height: 300px;
    }
}

/* detailed zoom: the picture at (up to) full size, scroll around inside */
.photo-zoom.photo-zoom--detail {
    width: 96vw;
    max-width: 96vw;
    height: 92vh;
    max-height: 92vh;
    overflow: auto;
    cursor: default;
    background: #fff;
}

.photo-zoom.photo-zoom--detail img {
    max-width: none;
    max-height: none;
    width: max(100%, min(1600px, 100%));
    min-width: 100%;
    height: auto;
}

.photo-zoom.photo-zoom--detail .photo-zoom-close {
    position: fixed;
    top: calc(4vh + 8px);
    right: calc(2vw + 8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    /* phones: show wide diagrams at a readable size; scroll sideways */
    .photo-zoom.photo-zoom--detail img {
        width: auto;
        min-width: 100%;
        max-width: 1400px;
    }
}

/* the startup pass 2: calmer picture sizes - detailed pictures medium, simple ones small; click any to zoom */
.item-full-content .image-group--tall img {
    width: min(100%, 460px);
}

.item-full-content .image-group--single img {
    width: min(100%, 260px);
}

.item-full-content .image-group--narrow .image-group-row {
    max-width: 560px;
    margin: 0 auto;
}

.item-full-content .image-group--pair .image-group-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 520px;
    margin: 0 auto;
}

.item-full-content .image-group--pair img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

.item-full-content .image-carousel-item img {
    height: 340px;
}

.item-full-content .image-carousel-item--wide {
    width: min(80%, 520px);
}

@media (max-width: 768px) {
    .item-full-content .image-carousel-item img {
        height: 260px;
    }
}

/* Recommender's round photo beside their name (home + I brag) */
.quote-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quote-who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.quote-photo {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e6e6e6;
}

.brag-quote figcaption .quote-person + .recognition-ext {
    margin-top: 12px;
}

.quote-card figcaption.quote-person {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Article pages: tighter gap between the title, the role line and the first section */
.item-content-header {
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.item-full-title {
    margin-bottom: 0;
}

.item-meta:not(:empty) {
    margin-top: 10px;
}

.item-content {
    padding-top: 0;
}

.item-full-content .item-subtitle {
    margin-bottom: 8px;
}

.item-full-content .item-subtitle + h3,
.item-full-content .item-subtitle + h2,
.item-full-content .item-link-line + h3 {
    margin-top: 18px;
}

/* Picture strips: each picture takes its real width before it has loaded,
   so the row doesn't jump (and re-snap to the 2nd picture) as pictures arrive */
.recognition-strip img {
    aspect-ratio: var(--ar);
}

/* "Featured work" title over the home projects: phones only (where they sit below the tiles) */
.home-work-heading {
    display: none;
}

@media (max-width: 768px) {
    .main-content:not(.content-view) .home-work-heading {
        display: block;
        order: 4;
        margin: 28px 0 0;
    }

    .main-content:not(.content-view) .home-work-list {
        order: 5;
    }
}

/* ==== Desktop home: "Featured work" carousel on the left, I build stuff on the right ==== */
.feature-carousel,
.home-tile--desk {
    display: none;
}

@media (min-width: 769px) {
    .main-content:not(.content-view) {
        grid-template-rows: repeat(8, 1fr);
    }

    /* right column: I build stuff first, then the other 7 */
    .main-content:not(.content-view) .home-tile--desk {
        display: flex;
    }

    /* left column: title in row 1, one carousel card in rows 2-8 */
    .main-content:not(.content-view) .home-build-tile,
    .main-content:not(.content-view) .home-work-list {
        display: none;
    }

    .main-content:not(.content-view) .home-work-heading {
        display: block;
        grid-row: 1;
        align-self: end;
        margin: 0;
    }

    .main-content:not(.content-view) .feature-carousel:not([hidden]) {
        display: block;
        grid-row: 2 / -1;
        position: relative;
        min-height: 0;
        background-color: var(--tile-bg);
        border-radius: var(--tile-radius);
        box-shadow: var(--tile-shadow);
        overflow: hidden;
    }
}

.feature-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.feature-track::-webkit-scrollbar {
    display: none;
}

.feature-slide {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    scroll-snap-align: start;
    color: #333;
    text-decoration: none;
}

.feature-pic {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background-color: #f3f3f3;
}

.feature-pic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.feature-text {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px 34px;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.feature-meta {
    font-size: 13px;
    color: #777;
}

.feature-line {
    font-size: 14px;
    line-height: 1.45;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (hover: hover) {
    .feature-slide:hover .feature-title {
        color: var(--accent);
    }

    .feature-slide:hover .feature-pic img {
        transform: scale(1.02);
    }
}

.feature-slide:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

.feature-btn {
    position: absolute;
    top: 38%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.feature-prev { left: 10px; }
.feature-next { right: 10px; }

.feature-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.feature-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.feature-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #d0d0d0;
    cursor: pointer;
}

.feature-dot.is-on {
    background-color: var(--accent);
}

/* the carousel fills its rows but never makes them taller: the picture takes
   whatever height is left after the text */
@media (min-width: 769px) {
    .main-content:not(.content-view) .feature-carousel:not([hidden]) {
        contain: size;
        height: 100%;
    }
}

.feature-pic {
    position: relative;
}

.feature-pic img {
    position: absolute;
    inset: 0;
}

/* "Featured work" sits inside the white card (desktop), so the left column
   is one tile from top to bottom like the photo and the tiles */
.feature-head {
    display: none;
}

@media (min-width: 769px) {
    .main-content:not(.content-view) .home-work-heading {
        display: none;
    }

    .main-content:not(.content-view) .feature-carousel:not([hidden]) {
        grid-row: 1 / -1;
        display: flex;
        flex-direction: column;
    }

    .feature-head {
        display: block;
        flex: none;
        margin: 0;
        padding: 16px 18px 12px;
        font-family: var(--font-heading);
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }

    .feature-carousel .feature-track {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
    }

    .feature-btn {
        top: 42%;
    }
}

.feature-dots {
    align-items: center;
}

.feature-count {
    margin-left: 8px;
    font-size: 12px;
    color: #888;
    font-variant-numeric: tabular-nums;
}

/* ==== Phones: photo → Featured work (same carousel card as desktop) → all 8 tiles ==== */
@media (max-width: 768px) {
    .main-content:not(.content-view) .home-work-heading,
    .main-content:not(.content-view) .home-work-list {
        display: none;
    }

    .main-content:not(.content-view) .feature-carousel:not([hidden]) {
        display: flex;
        flex-direction: column;
        order: 2;
        position: relative;
        height: 470px;
        background-color: var(--tile-bg);
        border-radius: var(--tile-radius);
        box-shadow: var(--tile-shadow);
        overflow: hidden;
    }

    .feature-head {
        display: block;
        flex: none;
        margin: 0;
        padding: 14px 16px 10px;
        font-family: var(--font-heading);
        font-size: 18px;
        font-weight: 600;
        color: #333;
    }

    .feature-carousel .feature-track {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
    }

    .feature-btn {
        top: 40%;
    }

    /* all the section tiles come after it: I build stuff (left column) then the rest */
    .main-content:not(.content-view) .home-build-tile { order: 3; }
    .main-content:not(.content-view) .sidebar-right   { order: 4; }
}

@media (max-width: 768px) {
    .main-content:not(.content-view) .feature-carousel:not([hidden]) {
        height: 490px;
    }

    .feature-text {
        padding-bottom: 38px;
    }
}

/* Small section label above an article title: "✍️ I write" - opens that section's list */
.item-section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent);
    text-decoration: none;
}

.item-section-label:hover {
    text-decoration: underline;
}

.item-section-label:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==== Article navigation: back + "All <section> →", and "More in <section>" at the end ==== */
.article-nav {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.article-nav-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.article-nav-all:hover {
    text-decoration: underline;
}

.article-pin-bar .article-nav-all {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 13px;
}

.more-from {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.more-from-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.more-from-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.more-from-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.more-from-all:hover {
    text-decoration: underline;
}

.more-from-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--tile-gap);
}

@media (max-width: 1024px) {
    .more-from-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

.all-short {
    display: none;
}

/* phones: the pinned bar keeps a short "All 🛠️ →" so it always fits beside the title */
@media (max-width: 768px) {
    .article-pin-bar .article-nav-all .all-long {
        display: none;
    }

    .article-pin-bar .article-nav-all .all-short {
        display: inline;
    }

    .article-pin-bar .article-nav-all {
        padding: 6px 0 6px 10px;
        border-left: 1px solid #e5e5e5;
    }
}

/* the card's top row is a link too: "Featured work · See all →" opens I build stuff */
@media (max-width: 9999px) {
    .feature-head {
        display: none;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        color: #333;
        text-decoration: none;
    }
}

@media (min-width: 0px) {
    .feature-carousel .feature-head {
        display: flex;
    }
}

.feature-head-all {
    font-family: var(--font-body, inherit);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
}

@media (hover: hover) {
    .feature-head:hover .feature-head-all {
        text-decoration: underline;
    }
}

.feature-head:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

/* ==== I build stuff revisions (3 Dec 2026) ==== */
/* one medium-size picture, centred */
.item-full-content .image-group--medium .image-group-row {
    display: flex;
    justify-content: center;
}

.item-full-content .image-group--medium img {
    width: min(100%, 360px);
    height: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

/* a phone screen recording, shown tall and centred */
.item-full-content .image-group--phone-video .image-group-row {
    display: flex;
    justify-content: center;
}

.item-full-content .image-group--phone-video video {
    display: block;
    width: min(100%, 300px);
    height: auto;
    border-radius: 22px;
    border: 6px solid #1d1d1f;
    background: #000;
}

/* photo carousel (e.g. ShareChat photos): equal-height photos, captions under */
.item-full-content .image-carousel--photos .image-carousel-item {
    width: 320px;
}

.item-full-content .image-carousel--photos .image-carousel-item img {
    height: 260px;
    object-fit: cover;
    background: #f3f3f3;
    border: 0;
}

.item-full-content .image-carousel figcaption {
    margin-top: 6px;
}

@media (max-width: 768px) {
    .item-full-content .image-carousel--photos .image-carousel-item {
        width: 80%;
    }

    .item-full-content .image-carousel--photos .image-carousel-item img {
        height: 220px;
    }
}

/* long sideways rows never widen the article (phones) */
.content-viewer,
.article-tile,
.item-content,
.item-full-content,
.item-full-content figure {
    min-width: 0;
}

.item-full-content .image-carousel-row {
    max-width: 100%;
}

/* the content column may never grow wider than the screen because of a long row inside */
.main-content.content-view {
    grid-template-columns: 300px minmax(0, 1fr);
}

.main-content.content-view .content-area {
    min-width: 0;
}

@media (max-width: 768px) {
    .main-content.content-view {
        grid-template-columns: minmax(0, 1fr);
    }
}
