.hero {
    padding: 72px 0 36px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    grid-template-areas:
        "content visual"
        "details details"
        "manifesto manifesto";
    gap: 30px 36px;
    align-items: start;
}

.hero__content {
    grid-area: content;
    position: relative;
    padding: 14px 24px 0 18px;
    isolation: isolate;
    max-width: 46rem;
}

.hero__content::before {
    content: "LEANDRO";
    position: absolute;
    left: -0.02em;
    top: -0.12em;
    z-index: -1;
    color: rgba(107, 84, 60, 0.045);
    font-family: var(--font-display);
    font-size: clamp(3.8rem, 10.4vw, 8rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    opacity: 1;
    white-space: nowrap;
}

.hero__content::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(164, 90, 52, 0.32), rgba(164, 90, 52, 0.1), transparent);
}

.hero__content h1 {
    font-size: clamp(2.8rem, 5.4vw, 4.85rem);
    max-width: 9.8ch;
    line-height: 0.98;
}

.hero__lead {
    max-width: 48ch;
    margin-top: 20px;
    font-size: clamp(1rem, 1.38vw, 1.1rem);
    color: var(--ice);
}

.hero__actions {
    margin-top: 28px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero__metrics {
    margin-top: 30px;
    width: min(100%, 36rem);
}

.hero__metrics-note {
    margin-top: 28px;
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero__spotlight {
    grid-area: visual;
    position: relative;
    padding-right: 18px;
}

.hero__details {
    grid-area: details;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 28px;
    align-items: start;
}

.hero__narrative {
    display: grid;
    gap: 20px;
    max-width: 60ch;
    padding-left: 18px;
}

.hero__supporting {
    max-width: 58ch;
    margin: 0;
    color: var(--muted);
}

.hero__quote {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 16px;
    max-width: 55ch;
}

.hero__quote-line {
    width: 74px;
    height: 6px;
    align-self: start;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), var(--teal));
}

.hero__quote p {
    color: var(--text);
    font-style: italic;
}

.manifesto-list {
    grid-area: manifesto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: none;
}

.manifesto-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    padding: 22px 24px;
    border: 1px solid rgba(114, 88, 61, 0.12);
    border-radius: 28px;
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: 0 18px 40px rgba(116, 82, 48, 0.09);
}

.manifesto-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(164, 90, 52, 0.08);
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.manifesto-item p {
    color: var(--text);
}

.manifesto-item:nth-child(2) {
    transform: translateY(16px);
}

.hero__visual {
    position: relative;
    padding: 24px 0 0 24px;
}

.hero__visual::before {
    content: "";
    position: absolute;
    inset: 28px 0 92px 56px;
    border: 1px solid rgba(107, 84, 60, 0.1);
    border-radius: 34px 132px 34px 116px;
    background: linear-gradient(145deg, rgba(141, 90, 60, 0.14), var(--panel) 48%, rgba(122, 115, 104, 0.08));
    box-shadow: 0 26px 50px rgba(116, 82, 48, 0.1);
    z-index: -2;
}

.hero__visual::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 8%;
    bottom: -22px;
    height: 148px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(141, 90, 60, 0.2), transparent 72%);
    filter: blur(30px);
    opacity: 0.74;
    z-index: -3;
}

.portrait-stage,
.signal-card,
.intro-band,
.story-card,
.capability-card,
.project-card,
.timeline-card,
.work-card,
.family-card,
.process-card,
.stack-group,
.closing-card,
.metric-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(114, 88, 61, 0.12);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: var(--shadow);
    backdrop-filter: none;
}

.portrait-stage::before,
.signal-card::before,
.intro-band::before,
.story-card::before,
.capability-card::before,
.project-card::before,
.timeline-card::before,
.work-card::before,
.family-card::before,
.process-card::before,
.stack-group::before,
.closing-card::before,
.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(164, 90, 52, 0.06), transparent 34%, rgba(107, 124, 93, 0.05));
    pointer-events: none;
}

.portrait-stage {
    min-height: clamp(500px, 55vw, 720px);
    aspect-ratio: 5 / 6;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    isolation: isolate;
    overflow: visible;
}

.portrait-stage::before {
    content: none;
}

.portrait-stage::after {
    content: "";
    position: absolute;
    inset: 18px -24px -18px 42px;
    border: 1px solid rgba(107, 84, 60, 0.12);
    border-radius: 30px 114px 30px 96px;
    z-index: -1;
}

.portrait-stage__mesh {
    display: none;
}

.portrait-stage__frame {
    position: relative;
    inset: auto;
    height: 100%;
    border-radius: 24px;
    background: var(--panel);
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow:
        inset 0 0 0 1px rgba(107, 84, 60, 0.08),
        0 14px 34px rgba(116, 82, 48, 0.08);
    transition: transform 220ms ease;
}

.portrait-stage__frame::before {
    content: "";
    position: absolute;
    left: 58%;
    right: -8%;
    bottom: 6%;
    height: 42%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(141, 90, 60, 0.18), transparent 72%);
    filter: blur(10px);
    mix-blend-mode: multiply;
    pointer-events: none;
}

.portrait-stage__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 24%, transparent 82%, rgba(107, 84, 60, 0.02));
    pointer-events: none;
}

.portrait-stage__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(4%) contrast(1.02);
    transform: none;
    mix-blend-mode: normal;
}

.portrait-stage__chips {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 90%;
    padding-left: 16px;
}

.portrait-stage__chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid rgba(114, 88, 61, 0.1);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(116, 82, 48, 0.08);
}

.portrait-stage__chip:nth-child(3n + 2) {
    transform: translateY(8px);
}

.portrait-stage__chip:nth-child(3n) {
    transform: rotate(-1.8deg);
}

.signal-card {
    padding: 28px;
}

.signal-card__eyebrow {
    margin-bottom: 18px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.signal-grid {
    display: grid;
    gap: 12px;
}

.signal-grid__item {
    padding: 16px 16px 18px;
    border: 1px solid rgba(114, 88, 61, 0.1);
    border-radius: 20px;
    background: var(--panel);
}

.signal-grid__item span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.signal-grid__item strong {
    display: block;
    font-size: 0.94rem;
    line-height: 1.5;
    color: var(--text);
}

.metric-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    min-height: 146px;
    padding: 20px 20px 18px;
}

.metric-card:first-child {
    grid-column: span 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}

.metric-card:first-child p {
    flex: 1 1 240px;
    margin-top: 0;
    padding-bottom: 6px;
    max-width: 30ch;
}

.metric-card__value,
.metric-card__suffix {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.15rem);
    font-weight: 600;
    line-height: 0.86;
    color: var(--gold);
}

.metric-card__suffix {
    margin-left: 2px;
}

.metric-card p {
    margin-top: 14px;
    max-width: 18ch;
    color: var(--muted);
    font-size: 0.84rem;
}

.marquee-shell {
    width: min(100vw, 1600px);
    margin: 14px auto 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-slide 28s linear infinite;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-right: 18px;
}

.marquee-group span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(114, 88, 61, 0.1);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@keyframes marquee-slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.intro-band {
    margin-top: 30px;
    padding: 34px;
    display: grid;
    grid-template-columns: minmax(360px, 0.56fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.intro-band .section-heading {
    min-width: 0;
    margin-bottom: 0;
}

.intro-band .section-heading h2 {
    max-width: 8ch;
}

.intro-band__body {
    display: grid;
    gap: 18px;
}

.roots-shell {
    display: grid;
    gap: 24px;
}

.roots-intro {
    display: grid;
    gap: 16px;
    max-width: 72ch;
}

.roots-intro p {
    color: var(--muted);
}

.roots-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.roots-toggle {
    --roots-toggle-tone: rgba(141, 90, 60, 0.22);
    --roots-toggle-glow: rgba(141, 90, 60, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(114, 88, 61, 0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(252, 248, 242, 0.95), rgba(252, 248, 242, 0.82));
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(116, 82, 48, 0.08);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.roots-toggle:hover,
.roots-toggle:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(114, 88, 61, 0.2);
    color: var(--text);
    box-shadow: 0 14px 28px rgba(116, 82, 48, 0.12);
}

.roots-toggle:focus-visible {
    outline: none;
}

.roots-toggle.is-active {
    color: var(--text);
    border-color: var(--roots-toggle-tone);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 245, 238, 0.92));
    box-shadow: 0 18px 34px var(--roots-toggle-glow);
}

.roots-toggle--origin {
    --roots-toggle-tone: rgba(190, 109, 73, 0.42);
    --roots-toggle-glow: rgba(190, 109, 73, 0.18);
}

.roots-toggle--home {
    --roots-toggle-tone: rgba(95, 133, 119, 0.42);
    --roots-toggle-glow: rgba(95, 133, 119, 0.2);
}

.roots-toggle--family {
    --roots-toggle-tone: rgba(196, 154, 92, 0.42);
    --roots-toggle-glow: rgba(196, 154, 92, 0.18);
}

.roots-toggle__dot {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--roots-toggle-tone);
    box-shadow: 0 0 0 6px var(--roots-toggle-glow);
}

.roots-map-frame {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(114, 88, 61, 0.12);
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: var(--shadow);
    padding: 14px;
}

.roots-map-frame::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 26px;
    border: 1px solid rgba(114, 88, 61, 0.08);
    background:
        radial-gradient(circle at 12% 14%, rgba(164, 90, 52, 0.12), transparent 26%),
        radial-gradient(circle at 88% 18%, rgba(107, 124, 93, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.roots-map-toolbar {
    position: relative;
    z-index: 1;
    padding: 8px 10px 14px;
}

.roots-map-hint {
    margin: 0;
    max-width: 58ch;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.roots-map-canvas {
    position: relative;
    z-index: 1;
    min-height: 430px;
    height: min(68vh, 560px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(114, 88, 61, 0.12);
    background: #ddd3c3;
}

.roots-map-canvas,
.roots-map-canvas .leaflet-container {
    font-family: var(--font-ui);
}

.roots-map-canvas .leaflet-pane,
.roots-map-canvas .leaflet-control,
.roots-map-canvas .leaflet-top,
.roots-map-canvas .leaflet-bottom {
    z-index: 2;
}

.roots-map-canvas .leaflet-tile {
    filter: saturate(0.94) contrast(1.02);
}

.roots-map-canvas .leaflet-control-zoom {
    border: 0;
    box-shadow: 0 18px 32px rgba(116, 82, 48, 0.16);
}

.roots-map-canvas .leaflet-control-zoom a {
    width: 42px;
    height: 42px;
    border: 0;
    background: rgba(252, 248, 242, 0.94);
    color: var(--text);
    line-height: 42px;
    transition: background 180ms ease, color 180ms ease;
}

.roots-map-canvas .leaflet-control-zoom a:hover,
.roots-map-canvas .leaflet-control-zoom a:focus-visible {
    background: rgba(255, 255, 255, 0.98);
    color: var(--gold);
}

.roots-map-canvas .leaflet-control-attribution {
    padding: 4px 8px;
    border-radius: 12px 0 0 0;
    background: rgba(252, 248, 242, 0.86);
    color: var(--muted);
    backdrop-filter: blur(8px);
}

.roots-map-canvas .leaflet-control-attribution a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(114, 88, 61, 0.3);
}

.roots-map-canvas .leaflet-popup-content-wrapper {
    border-radius: 26px;
    padding: 0;
    background: rgba(252, 248, 242, 0.97);
    box-shadow: 0 24px 46px rgba(116, 82, 48, 0.18);
}

.roots-map-canvas .leaflet-popup-content {
    margin: 0;
}

.roots-map-canvas .leaflet-popup-tip {
    background: rgba(252, 248, 242, 0.97);
}

.roots-map-canvas .leaflet-popup-close-button {
    display: none;
}

.roots-popup-card {
    --roots-popup-tone: var(--gold);
    min-width: min(72vw, 290px);
    padding: 20px 20px 18px;
}

.roots-popup-card--origin {
    --roots-popup-tone: #be6d49;
}

.roots-popup-card--home {
    --roots-popup-tone: #5f8577;
}

.roots-popup-card--family {
    --roots-popup-tone: #c49a5c;
}

.roots-popup-card__eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--roots-popup-tone);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.roots-popup-card h3 {
    margin-bottom: 10px;
}

.roots-popup-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

#story,
#roots,
#studies,
#work,
#capabilities,
#projects,
#families,
#process,
#stack {
    padding-top: 118px;
}

.story-grid,
.timeline-grid,
.work-grid,
.capability-grid,
.project-grid,
.family-grid,
.process-grid,
.stack-groups {
    display: grid;
    gap: 20px;
}

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

.work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.story-card,
.timeline-card,
.work-card,
.family-card {
    padding: 28px;
}

.story-card h3,
.timeline-card h3,
.work-card h3,
.family-card h3 {
    margin-bottom: 12px;
}

.capability-card h3,
.project-card h3,
.process-card h3,
.stack-group h3,
.story-card h3,
.timeline-card h3,
.work-card h3,
.family-card h3 {
    padding-bottom: 0.08em;
}

.story-card p:last-child,
.timeline-card__text,
.work-card__text,
.family-card__angle {
    color: var(--muted);
}

.timeline-card__place,
.work-card__place,
.family-card__examples {
    margin-bottom: 14px;
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.timeline-card__text,
.work-card__text {
    margin-bottom: 18px;
}

.family-card__examples {
    margin-top: 16px;
}

.family-card__angle {
    margin-top: 16px;
}

.capability-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.capability-card {
    padding: 30px 28px;
}

.capability-card:nth-child(2) {
    margin-top: 36px;
}

.capability-card:nth-child(3) {
    margin-top: 14px;
}

.card-kicker {
    margin-bottom: 18px;
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.capability-card__text {
    margin-top: 14px;
    margin-bottom: 18px;
    color: var(--ice);
}

.project-section__intro {
    max-width: 64ch;
    margin-bottom: 26px;
    padding-left: 18px;
}

.project-section__intro p {
    color: var(--muted);
}

.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.project-card {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 28px;
    transform-style: preserve-3d;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card.is-collapsed {
    display: none;
}

.project-card:hover {
    border-color: rgba(164, 90, 52, 0.2);
    box-shadow: 0 24px 54px rgba(116, 82, 48, 0.14);
}

.project-card__header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 18px;
    margin-bottom: 4px;
}

.project-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(164, 90, 52, 0.18);
    border-radius: 18px;
    background: rgba(164, 90, 52, 0.08);
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.project-card__eyebrow {
    color: var(--gold);
    font-family: var(--font-ui);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.project-card__summary {
    color: var(--ice);
}

.project-card__impact {
    margin-bottom: 6px;
    color: var(--muted);
}

.project-grid__controls {
    margin-top: 28px;
    display: flex;
    justify-content: flex-start;
}

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

.process-card {
    min-height: 300px;
    padding: 26px;
}

.process-card__index {
    display: inline-block;
    margin-bottom: 46px;
    color: rgba(164, 90, 52, 0.88);
    font-family: var(--font-display);
    font-size: 3.3rem;
    font-weight: 600;
    line-height: 0.76;
}

.process-card p {
    margin-top: 12px;
    color: var(--muted);
}

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

.stack-group {
    padding: 26px;
}

.stack-group h3 {
    margin-bottom: 16px;
}

.closing-shell {
    padding: 126px 0 100px;
}

.closing-card {
    padding: 44px;
}

.closing-card p:not(.eyebrow) {
    margin-top: 18px;
    max-width: 64ch;
}

html[data-theme="dark"] .hero__content::before {
    color: rgba(243, 234, 223, 0.06);
}

html[data-theme="dark"] .hero__content::after {
    background: linear-gradient(180deg, rgba(229, 160, 106, 0.34), rgba(140, 163, 147, 0.12), transparent);
}

html[data-theme="dark"] .hero__visual::before {
    border-color: rgba(243, 234, 223, 0.1);
    background: linear-gradient(145deg, rgba(229, 160, 106, 0.16), rgba(18, 24, 29, 0.72) 52%, rgba(140, 163, 147, 0.08));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .hero__visual::after {
    background: radial-gradient(circle, rgba(229, 160, 106, 0.22), transparent 72%);
    opacity: 0.9;
}

html[data-theme="dark"] .manifesto-item,
html[data-theme="dark"] .signal-card,
html[data-theme="dark"] .intro-band,
html[data-theme="dark"] .roots-map-frame,
html[data-theme="dark"] .story-card,
html[data-theme="dark"] .capability-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .timeline-card,
html[data-theme="dark"] .work-card,
html[data-theme="dark"] .family-card,
html[data-theme="dark"] .process-card,
html[data-theme="dark"] .stack-group,
html[data-theme="dark"] .closing-card,
html[data-theme="dark"] .metric-card {
    border-color: rgba(243, 234, 223, 0.1);
    background: linear-gradient(180deg, rgba(19, 24, 29, 0.96), rgba(12, 17, 21, 0.92));
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .portrait-stage::after {
    border-color: rgba(243, 234, 223, 0.12);
}

html[data-theme="dark"] .portrait-stage__frame {
    background: rgba(18, 24, 29, 0.56);
    box-shadow:
        inset 0 0 0 1px rgba(243, 234, 223, 0.08),
        0 18px 42px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .portrait-stage__frame::before {
    background: radial-gradient(circle, rgba(229, 160, 106, 0.2), transparent 72%);
    mix-blend-mode: screen;
}

html[data-theme="dark"] .portrait-stage__frame::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%, transparent 82%, rgba(229, 160, 106, 0.06));
}

html[data-theme="dark"] .portrait-stage__image {
    filter: grayscale(8%) contrast(1.04) brightness(0.9);
}

html[data-theme="dark"] .portrait-stage__chip,
html[data-theme="dark"] .signal-grid__item,
html[data-theme="dark"] .marquee-group span {
    border-color: rgba(243, 234, 223, 0.1);
    background: rgba(16, 22, 27, 0.72);
    box-shadow: none;
}

html[data-theme="dark"] .roots-toggle {
    border-color: rgba(243, 234, 223, 0.1);
    background: linear-gradient(180deg, rgba(21, 27, 31, 0.96), rgba(16, 22, 27, 0.82));
    color: var(--muted);
    box-shadow: none;
}

html[data-theme="dark"] .roots-toggle:hover,
html[data-theme="dark"] .roots-toggle:focus-visible,
html[data-theme="dark"] .roots-toggle.is-active {
    color: var(--text);
    border-color: var(--roots-toggle-tone);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .roots-map-frame::before {
    border-color: rgba(243, 234, 223, 0.1);
    background:
        radial-gradient(circle at 12% 14%, rgba(229, 160, 106, 0.14), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(140, 163, 147, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(32, 39, 46, 0.72), rgba(13, 18, 22, 0.32));
}

html[data-theme="dark"] .roots-map-canvas {
    border-color: rgba(243, 234, 223, 0.1);
    background: #1a2328;
}

html[data-theme="dark"] .roots-map-canvas .leaflet-tile {
    filter: brightness(0.78) contrast(1.08) saturate(0.82);
}

html[data-theme="dark"] .roots-map-canvas .leaflet-control-zoom a {
    background: rgba(15, 21, 26, 0.92);
    color: var(--text);
}

html[data-theme="dark"] .roots-map-canvas .leaflet-control-attribution {
    background: rgba(15, 21, 26, 0.84);
    color: var(--muted);
}

html[data-theme="dark"] .roots-map-canvas .leaflet-popup-content-wrapper,
html[data-theme="dark"] .roots-map-canvas .leaflet-popup-tip {
    background: rgba(16, 22, 27, 0.96);
}

html[data-theme="dark"] .roots-popup-card p,
html[data-theme="dark"] .roots-map-hint {
    color: var(--muted);
}

html[data-theme="dark"] .manifesto-item span,
html[data-theme="dark"] .project-card__number {
    border-color: rgba(229, 160, 106, 0.24);
    background: rgba(229, 160, 106, 0.12);
}

html[data-theme="dark"] .project-card:hover {
    border-color: rgba(229, 160, 106, 0.24);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1380px) {
    .portrait-stage {
        min-height: clamp(460px, 48vw, 640px);
    }
}

@media (max-width: 1180px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "content"
            "visual"
            "details"
            "manifesto";
    }

    .hero__content {
        padding-top: 0;
        max-width: none;
        padding-right: 0;
    }

    .hero__content::before {
        font-size: clamp(3.8rem, 15vw, 7rem);
    }

    .hero__spotlight {
        padding-right: 0;
    }

    .hero__visual {
        padding-left: 18px;
    }

    .hero__visual::before {
        inset: 22px 0 86px 40px;
    }

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

    .intro-band {
        grid-template-columns: 1fr;
    }

    .hero__narrative {
        padding-left: 18px;
    }

    .capability-grid,
    .timeline-grid,
    .work-grid,
    .family-grid,
    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .capability-card:nth-child(2),
    .capability-card:nth-child(3) {
        margin-top: 0;
    }

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

    .portrait-stage {
        min-height: clamp(420px, 70vw, 620px);
    }

    .manifesto-item:nth-child(2) {
        transform: none;
    }
}

@media (max-width: 860px) {
    .project-grid,
    .stack-groups,
    .intro-band,
    .story-grid,
    .capability-grid,
    .timeline-grid,
    .work-grid,
    .family-grid,
    .process-grid,
    .manifesto-list {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 48px;
    }

    .hero__visual {
        padding: 14px 0 0;
    }

    .hero__visual::before {
        inset: 18px 0 78px 18px;
        border-radius: 28px 110px 28px 92px;
    }

    .hero__visual::after {
        left: 12%;
        right: 4%;
    }

    #story,
    #roots,
    #studies,
    #work,
    #capabilities,
    #projects,
    #families,
    #process,
    #stack {
        padding-top: 94px;
    }

    .portrait-stage {
        min-height: clamp(360px, 86vw, 520px);
    }

    .portrait-stage::after {
        inset: 14px -10px -12px 22px;
    }

    .portrait-stage__frame {
        border-radius: 20px;
    }

    .portrait-stage__chips {
        max-width: 100%;
        padding-left: 6px;
    }

    .marquee-group span {
        min-height: 38px;
        font-size: 0.62rem;
    }

    .roots-map-canvas {
        min-height: 390px;
        height: 58vh;
    }
}

@media (max-width: 720px) {
    .hero__actions {
        flex-direction: column;
    }

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

    .hero__quote-line {
        width: 96px;
    }

    .signal-card,
    .metric-card,
    .intro-band,
    .roots-map-frame,
    .story-card,
    .capability-card,
    .project-card,
    .timeline-card,
    .work-card,
    .family-card,
    .process-card,
    .stack-group,
    .closing-card {
        padding: 22px;
    }

    .metric-card {
        min-height: 148px;
    }

    .metric-card:first-child {
        grid-column: auto;
    }

    .closing-shell {
        padding: 102px 0 80px;
    }

    .portrait-stage {
        min-height: clamp(320px, 92vw, 460px);
    }

    .portrait-stage__frame {
        border-radius: 18px;
    }

    .portrait-stage::after {
        inset: 12px -4px -10px 16px;
        border-radius: 24px 84px 24px 72px;
    }

    .roots-map-frame::before {
        inset: 10px;
        border-radius: 22px;
    }

    .roots-map-toolbar {
        padding: 4px 4px 12px;
    }

    .roots-map-canvas {
        min-height: 340px;
        height: 52vh;
    }
}

@media (max-width: 560px) {
    .hero__content {
        padding-left: 14px;
    }

    .hero__narrative {
        padding-left: 14px;
    }

    .hero__lead {
        max-width: 32ch;
    }

    .metric-stack {
        grid-template-columns: 1fr;
    }

    .portrait-stage {
        min-height: clamp(280px, 96vw, 420px);
    }

    .portrait-stage__frame {
        border-radius: 16px;
    }

    .portrait-stage__chip {
        max-width: 100%;
        white-space: normal;
        line-height: 1.3;
    }

    .roots-toggle {
        width: 100%;
        justify-content: center;
    }

    .roots-map-canvas {
        min-height: 300px;
        height: 48vh;
    }
}
