.personal-section {
    padding: 90px 0;
    background: linear-gradient(140deg, #17352f, #132923 60%, #25251e);
    border-block: 1px solid #716043;
    scroll-margin-top: 110px;
}

.personal-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 35px;
}

.personal-kicker {
    color: #e9bf79;
    font-size: .75rem;
    letter-spacing: .14em;
    margin-bottom: 12px;
}

.personal-intro h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: #fff0d5;
    font-size: clamp(2.1rem, 4vw, 3.5rem);
    line-height: 1.15;
}

.personal-intro>p {
    max-width: 410px;
    color: #d5d8c9;
    font-size: .95rem;
}

/* Keep every photograph visible, including portrait and panoramic images. */
.memory-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.memory-card {
    min-width: 0;
    margin: 0;
    padding: 8px;
    background: #f4ead8;
    border-radius: 4px;
    box-shadow: 0 9px 24px #0003;
}

.memory-card--large,
.memory-card--wide,
.memory-card--tall {
    grid-column: auto;
    grid-row: auto;
}

.photo-open {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: #14241f;
    cursor: zoom-in;
}

.photo-open:focus-visible {
    outline: 3px solid #f2b34d;
    outline-offset: 3px;
}

.memory-card img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center;
}

.memory-card .photo-open:hover img {
    filter: brightness(1.06);
}

.meetup-note {
    max-width: 320px;
    margin: 24px auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    background: var(--bg-card);
}

.meetup-note img {
    display: block;
    width: 100%;
    height: auto;
}

.meetup-note figcaption {
    padding: 10px 4px 3px;
    font-size: .8rem;
    color: var(--text-secondary);
}

.hardware-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.hardware-gallery figure {
    min-width: 0;
    margin: 0;
}

.hardware-gallery img {
    display: block;
    width: 100%;
    height: 280px;
    object-fit: contain;
}

.hardware-gallery figcaption {
    font-size: .75rem;
    color: var(--text-secondary);
    padding-top: 8px;
}

.project-screenshot {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.project-status {
    color: var(--autrin-yellow);
    font-size: .8rem;
    margin-bottom: 12px;
}

.curiosity-card {
    margin-top: 65px;
    display: grid;
    grid-template-columns: .8fr 1.5fr;
    gap: 35px;
    padding: 30px;
    border: 1px solid #706144;
    border-radius: 12px;
    background: #101f1c;
    align-items: center;
}

.curiosity-copy h3 {
    font-family: Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    line-height: 1.15;
    color: #fff0d5;
    margin-bottom: 20px;
}

.curiosity-copy>p:not(.personal-kicker) {
    color: #ced4c8;
    font-size: .9rem;
}

.curiosity-links {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    font-size: .8rem;
}

.curiosity-links a {
    color: #f3ca87;
    text-underline-offset: 5px;
}

.map-open {
    position: relative;
    border: 1px solid #5e4765;
    border-radius: 5px;
}

.map-open img {
    width: 100%;
    height: auto;
    display: block;
}

.map-open span {
    display: block;
    color: #f7e7cf;
    background: #172d27;
    padding: 10px;
    font: inherit;
    font-size: .8rem;
}

.map-figure figcaption {
    color: #c5cbbf;
    font-size: .7rem;
    margin-top: 10px;
}

.photo-dialog {
    width: min(1500px, 95vw);
    max-height: 94dvh;
    margin: auto;
    padding: 18px;
    border: 1px solid #a48b60;
    border-radius: 12px;
    background: #10221e;
    color: #f4ead8;
}

.photo-dialog::backdrop {
    background: #030c0bea;
    backdrop-filter: blur(8px);
}

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

.photo-heading h2 {
    margin: 0;
}

#photo-counter {
    margin-top: 3px;
    color: #c9d0c3;
    font-size: 0.72rem;
}

.photo-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.photo-navigation {
    display: grid;
    place-items: center;
    width: 48px;
    height: 64px;
    border: 1px solid #a48b60;
    border-radius: 8px;
    background: #172d27;
    color: #f7e7cf;
    cursor: pointer;
    font-size: 1.25rem;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.photo-navigation:hover {
    color: #10221e;
    background: #f3ca87;
    border-color: #f3ca87;
    transform: scale(1.04);
}

.photo-navigation:focus-visible {
    outline: 3px solid #f2b34d;
    outline-offset: 3px;
}

.photo-navigation[hidden] {
    display: none;
}

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

.photo-toolbar {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 12px;
}

.photo-toolbar:last-child {
    padding: 12px 0 0;
}

.photo-toolbar h2 {
    font-size: 1rem;
    font-weight: 400;
}

.photo-toolbar p {
    font-size: .75rem;
    color: #c9d0c3;
}

.photo-toolbar button {
    flex-shrink: 0;
}

.photo-viewport {
    max-height: 70dvh;
    overflow: auto;
    background: #08110f;
}

.photo-viewport img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70dvh;
    margin: auto;
    cursor: zoom-in;
}

.is-zoomed .photo-viewport img {
    max-width: none;
    max-height: none;
    width: auto;
    cursor: zoom-out;
}

@media(max-width:760px) {
    .personal-intro {
        display: block;
    }

    .personal-intro>p {
        margin-top: 20px;
    }

    .curiosity-card {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .memory-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .memory-card img {
        height: 230px;
    }

    .photo-stage {
        gap: 6px;
    }

    .photo-navigation {
        width: 32px;
        height: 48px;
    }

    .photo-dialog {
        width: 96vw;
        padding: 12px;
    }

    .photo-toolbar h2 {
        font-size: .85rem;
    }

    .meetup-note {
        max-width: 300px;
    }
}

@media(max-width:480px) {
    .nav {
        gap: 13px;
    }

    .nav-link {
        font-size: .75rem;
    }

    .memory-gallery {
        grid-template-columns: 1fr;
    }

    .memory-card img {
        height: auto;
        max-height: 380px;
    }

    .photo-toolbar {
        flex-wrap: wrap;
    }

    .photo-navigation {
        width: 28px;
    }

    .hardware-gallery img {
        height: 230px;
    }
}

#autonomy-stack {
    scroll-margin-top: 110px;
}