:root {
    color-scheme: light;
    --paper: #f4f7f7;
    --surface: #fff;
    --ink: #10202d;
    --muted: #455968;
    --rule: #d9e4e7;
    --accent: #006e63;
    --bright: #b8f7e4;
    --soft: #e5f6f1;
    --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #0a9f87; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.03em; }
.wrap { width: min(100% - 2 * clamp(1rem, 4vw, 3rem), 76rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; inset: .8rem auto auto .8rem; transform: translateY(-230%); background: var(--surface); padding: .5rem .8rem; }
.skip-link:focus { transform: none; }
.site-header, .compact-header { background: var(--ink); color: #fff; }
.masthead { position: relative; display: flex; align-items: center; gap: clamp(.85rem, 3vw, 2.5rem); min-height: 4.5rem; }
.wordmark, .footer-logo { font-weight: 820; letter-spacing: -.07em; line-height: 1; text-decoration: none; white-space: nowrap; }
.wordmark { font-size: clamp(1.65rem, 4vw, 2.55rem); }
.wordmark span, .compact-header .footer-logo span { color: var(--bright); }
.site-header a:hover, .compact-header a:hover, .projects-menu summary:hover { color: var(--bright); }
.main-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 0 clamp(.6rem, 2vw, 1.6rem); font-weight: 600; font-size: .94rem; }
.main-navigation > a, .projects-menu summary, .masthead-contact { display: flex; align-items: center; min-height: 2.75rem; padding-block: .2rem; text-decoration: none; }
.masthead-contact { margin-left: auto; font-size: .9rem; }
.projects-menu { position: relative; }
.projects-menu summary { gap: .45rem; list-style: none; cursor: pointer; }
.projects-menu summary::-webkit-details-marker { display: none; }
.projects-menu summary::after { content: ''; width: .42rem; height: .42rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.11rem) rotate(45deg); }
.projects-menu[open] summary { color: var(--bright); }
.projects-menu[open] summary::after { transform: translateY(.12rem) rotate(225deg); }
.project-links { position: absolute; z-index: 5; top: calc(100% + .45rem); left: -.7rem; width: min(36rem, 86vw); border: 1px solid var(--rule); border-radius: .85rem; padding: .6rem; background: var(--surface); color: var(--ink); box-shadow: 0 1.2rem 3rem #142a3930; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.project-links > div + div { border-left: 1px solid var(--rule); padding-left: .45rem; }
.project-links a { min-height: 2.75rem; display: flex; flex-direction: column; justify-content: center; gap: .1rem; padding: .46rem .55rem; border-radius: .4rem; font-size: .93rem; line-height: 1.3; text-decoration: none; }
.project-links a:hover { background: var(--soft); color: var(--accent); }
.project-links a span { color: var(--muted); font-size: .875rem; font-weight: 400; }

.home-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(16rem, 1fr); gap: 1.05rem; padding-top: clamp(1rem, 3vw, 2.25rem); }
.cover { min-height: 24rem; position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: end; border-radius: 1.05rem; color: #fff; background: var(--ink); }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 56%; z-index: -2; }
.cover::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #081520 3%, #081520e8 24%, #08152030 78%, transparent 100%); }
.cover-content { max-width: 33rem; padding: clamp(1.25rem, 4.5vw, 2.75rem); }
.section-label { margin-bottom: .38rem; color: var(--accent); font-size: .875rem; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.cover .section-label { color: var(--bright); }
.cover h1 { margin-bottom: .45rem; font-size: clamp(2.6rem, 6vw, 5.3rem); letter-spacing: -.065em; }
.cover p:not(.section-label) { max-width: 43ch; color: #f5fafa; }
.cover-link { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .45rem .8rem; margin-top: .85rem; background: var(--bright); color: var(--ink); border-radius: .45rem; text-decoration: none; font-weight: 720; }
.cover-link:hover { background: #dcfff6; color: var(--ink); }
.image-label { position: absolute; top: .6rem; right: .6rem; padding: .18rem .39rem; border-radius: .22rem; font-size: .75rem; background: #10202de6; color: white; }

.discover { display: grid; gap: 1.05rem; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.discover-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 1rem; padding: clamp(1rem, 2vw, 1.55rem); display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.luo-card { background: var(--soft); border-color: #cfe8df; }
.discover-card h2 { font-size: .96rem; color: var(--accent); letter-spacing: 0; }
.widget-value { padding: .78rem 0 .5rem; overflow-wrap: anywhere; }
.widget-value strong { display: block; font-size: clamp(1.28rem, 2.55vw, 1.86rem); line-height: 1.13; letter-spacing: -.034em; }
.widget-value p { margin-top: .25rem; color: var(--muted); }
.widget-extra { font-size: .9rem; }
.widget-value p:empty { display: none; }
.widget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .75rem; font-size: .9rem; font-weight: 680; }
.widget-actions a { display: inline-flex; min-height: 2.75rem; align-items: center; }
.widget-reroll { background: var(--ink); color: #fff; padding: .39rem .7rem; border-radius: .42rem; text-decoration: none; }
.widget-reroll:hover { background: #0f4a50; color: white; }
[aria-busy=true] .widget-reroll { opacity: .7; }

.thoughts-section, .news-module { margin-top: clamp(1.4rem, 4vw, 2.8rem); }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .8rem; }
.section-heading h2, .photo-text h2 { font-size: clamp(1.65rem, 3.2vw, 2.65rem); }
.story-link { color: var(--accent); font-weight: 690; min-height: 2.75rem; display: inline-flex; align-items: center; }
.thought-grid, .news-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.5rem), 1fr)); gap: 1rem; }
.thought, .latest-story { border: 1px solid var(--rule); background: var(--surface); padding: 1rem 1.15rem; border-radius: .85rem; min-width: 0; overflow-wrap: anywhere; }
.thought p { margin: .4rem 0 0; white-space: pre-wrap; }
.entry-more { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--accent); font-size: .9rem; }
time { display: block; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.latest-story h3 { font-size: 1.27rem; margin-top: .33rem; }
.latest-story h3 a { text-decoration: none; }
.latest-story p { color: var(--muted); margin-top: .4rem; }
.thoughts-index { max-width: 58rem; margin-block: clamp(1.35rem, 4vw, 2.6rem); }
.thoughts-index h1, .photo-page h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.thought-list { display: grid; gap: .8rem; margin-top: 1rem; }
.thought-list .thought:target { border-color: #6bc6b5; box-shadow: 0 0 0 .1rem #c5eee5; }

.photo-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #e0efeb; margin-block: clamp(1.4rem, 4vw, 2.8rem); border-radius: .9rem; overflow: hidden; }
.photo-frame img { width: 100%; height: 100%; min-height: 14rem; max-height: 20rem; object-fit: cover; object-position: 50% 58%; }
.photo-text { padding: clamp(1.15rem, 4vw, 2.5rem); align-self: center; }
.photo-text p { color: var(--muted); margin-top: .35rem; }
.site-footer { border-top: 1px solid var(--rule); background: #eaf0f0; padding-block: 1.25rem; }
.footer-content { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem clamp(.8rem, 3vw, 1.9rem); font-size: .9rem; }
.footer-logo { font-size: 1.9rem; }
.site-footer .footer-logo span { color: var(--accent); }
.footer-content > span { margin-right: auto; }
.compact-navigation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.2rem; min-height: 4.2rem; padding-block: .7rem; }
.compact-navigation nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; }
.compact-navigation [aria-current] { color: var(--bright); }
.article-wrap { width: min(100% - 2rem, 55rem); margin-inline: auto; padding-block: clamp(1.6rem, 5vw, 3.6rem); }
.article-heading { max-width: 48rem; margin-bottom: 1.1rem; }
.article-heading h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.065em; }
.lead-summary { color: var(--muted); margin-top: .55rem; max-width: 62ch; font-size: 1.12rem; }
.article-image img { width: 100%; aspect-ratio: 2; object-fit: cover; object-position: 50% 55%; border-radius: .85rem; }
.article-image figcaption, .data-figure figcaption { color: var(--muted); font-size: .88rem; margin-top: .36rem; }
.article-body { max-width: 46rem; margin: clamp(1.2rem, 4vw, 2.35rem) auto 0; }
.article-body h2 { font-size: clamp(1.7rem, 3.5vw, 2.35rem); margin-bottom: .35rem; }
.article-body p + section { border-top: 1px solid var(--rule); margin-top: 1.5rem; padding-top: 1.1rem; }
.article-body time { margin-bottom: .35rem; }
.data-figure { margin-top: .8rem; }
.data-figure img { width: 100%; border: 1px solid var(--rule); border-radius: .4rem; }
.photo-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3.3rem); min-height: 62vh; align-items: center; padding-block: clamp(1.8rem, 6vw, 4.5rem); }
.photo-page img { border-radius: .85rem; width: min(100%, 31rem); margin-inline: auto; }
[id] { scroll-margin-top: .85rem; }

@media (max-width: 840px) {
    .masthead { flex-wrap: wrap; gap: .05rem 1.15rem; padding-top: .8rem; }
    .masthead-contact { order: 2; }
    .main-navigation { order: 3; width: 100%; justify-content: space-between; }
    .projects-menu { position: static; }
    .project-links { width: 100%; left: 0; top: 100%; }
    .home-grid { grid-template-columns: minmax(0, 1fr); }
    .discover { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
    .cover { min-height: max(19rem, 48vw); }
}
@media (max-width: 520px) {
    .main-navigation { gap: 0 .48rem; font-size: .84rem; }
    .project-links { max-height: min(51vh, 25rem); overflow-y: auto; grid-template-columns: minmax(0, 1fr); }
    .project-links > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: .3rem; }
    .discover, .photo-page, .photo-feature { grid-template-columns: minmax(0, 1fr); }
    .photo-frame img { min-height: 0; height: auto; aspect-ratio: 1.55; }
    .footer-content > span { margin-right: 0; }
}
