*{box-sizing:border-box} :root{--paper:#fff;--ink:#111;--muted:#555;--hover:#f0f0f0;color-scheme:light} :root[data-theme=dark]{--paper:#000;--ink:#fff;--muted:#bbb;--hover:#1a1a1a;color-scheme:dark}html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font-family:system-ui,sans-serif}body{min-height:100svh}a{color:inherit}button{font:inherit;cursor:pointer}#honeycomb{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;color:var(--ink)}header{position:relative;z-index:3;display:flex;justify-content:space-between;align-items:flex-start;padding:26px 32px;gap:12px}.wordmark{background:var(--paper);padding:8px 12px;text-decoration:none;font-size:21px;font-weight:600;letter-spacing:-.7px}.wordmark span{display:block;font-size:10px;letter-spacing:2px;text-transform:uppercase;font-weight:400;margin-top:5px}.controls{display:flex;gap:10px}.hex-control{width:52px;height:60px;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);background:var(--ink);color:var(--paper);border:0;font-size:23px}.hex-control:hover{opacity:.75}.hex-control:focus-visible{background:#777}.menu-wrap{position:relative}nav{position:absolute;right:0;top:70px;width:250px;padding:18px;background:var(--paper);border:1px solid var(--ink);box-shadow:0 12px 40px #0002}nav a{display:block;padding:9px;text-decoration:none}nav a:hover,nav a:focus-visible{background:var(--hover)}nav label{display:flex;gap:8px;font-size:13px;padding:10px 4px}nav hr{border:0;border-top:1px solid var(--ink)}.home{min-height:calc(100svh - 150px)}#cluster{position:fixed;inset:0;pointer-events:none;z-index:1}.tile{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:column;text-decoration:none;pointer-events:auto;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);background:var(--paper);color:var(--ink);gap:9px;transition:background .18s}.tile svg.outline{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.tile .icon{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.tile span{font-size:11px;text-align:center;max-width:80%;letter-spacing:.4px}.tile:hover,.tile:focus-visible{background:var(--hover);outline:none}.tile:focus-visible .outline{stroke-width:4}.hint{position:fixed;bottom:10%;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:12px;letter-spacing:1px;background:var(--paper);padding:8px 12px;z-index:2}footer{position:relative;z-index:2;padding:12px 32px;font-size:10px;letter-spacing:1px;width:fit-content;background:var(--paper)}.home+footer{position:fixed;bottom:12px}.article{position:relative;z-index:1;max-width:850px;margin:7vh auto 10vh;padding:clamp(24px,6vw,72px);background:var(--paper);border:1px solid var(--ink);min-height:420px}.article h1{font-family:Georgia,serif;font-size:clamp(36px,6vw,64px);font-weight:400;letter-spacing:-2px;margin:22px 0}.article p{line-height:1.8}.back{font-size:12px}.eyebrow{font-size:10px;letter-spacing:2px;margin-top:50px}.placeholder{font-size:21px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:600px){header{padding:14px 10px}.wordmark{font-size:18px}.wordmark span{font-size:8px}.hex-control{width:42px;height:48px}.article{margin:40px 14px}.hint{bottom:13%;font-size:10px}footer{padding:8px 12px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Fade only the background outlines, centered on the active middle hexagon.
   closest-side makes the pattern fully transparent at every viewport edge. */
#honeycomb {
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 0%, rgb(0 0 0 / .8) 25%, rgb(0 0 0 / .35) 60%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 0%, rgb(0 0 0 / .8) 25%, rgb(0 0 0 / .35) 60%, transparent 100%);
}

/* Debug labels remain readable beyond the background fade. */
#tile-indices{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;fill:#f33}
#tile-indices text{font:600 12px system-ui,sans-serif;text-anchor:middle;paint-order:stroke;stroke:var(--paper);stroke-width:4px;stroke-linejoin:round}

/* Theme-aware icons, enlarged from 48px to 72px. */
.tile .icon{width:72px;height:72px;object-fit:contain;flex-shrink:0}
.tile .supplied-icon{filter:grayscale(1) contrast(2);mix-blend-mode:multiply}
:root[data-theme=dark] .tile .supplied-icon{filter:grayscale(1) contrast(2) invert(1);mix-blend-mode:screen}
.tile .icon-pair{width:72px;height:72px;display:block;max-width:none}
.icon-dark{display:none}:root[data-theme=dark] .icon-light{display:none}:root[data-theme=dark] .icon-dark{display:block}
/* Opaque themed article panels keep the hexagon canvas outside the content. */
.article{background:var(--paper);border:0;max-width:1000px;z-index:2}
.article header{position:static;display:block;padding:0;z-index:auto}
.article h2{font-size:clamp(25px,4vw,36px);margin-top:2em}
.article h3{margin-top:1.5em}.article li{line-height:1.75}
.article img,.article video,.article canvas{max-width:100%;height:auto}
.article iframe{width:100%;aspect-ratio:16/9;height:auto;border:0}
.article .row_custom,.article .two_imgs_horizontal,.article .three_imgs_horizontal,.lyrics-images{display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
.article .column_custom,.article .two_imgs_horizontal>* ,.article .three_imgs_horizontal>*,.lyrics-images figure{flex:1;min-width:180px;max-width:100%;margin:0}
.article .ssd-image-text-container>img{max-width:360px;width:100%}
.article .background-toggle{color:var(--ink);background:var(--paper);border:1px solid var(--ink);padding:12px;width:100%;text-align:left}
.article .background-panel[aria-hidden=true]{display:none}
.article .expandable-background{border-left:1px solid var(--muted);padding-left:16px;margin:24px 0}
.article pre{white-space:pre-wrap;overflow-wrap:anywhere}.article a{overflow-wrap:anywhere}
.article .migration-note{border:1px solid var(--muted);padding:16px}
.article .song-heading p,.article .translation{color:var(--muted)}
.article .line-pair,.article .language-heading{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.article .line-pair p{margin:.3em 0}.article .verse{margin:24px 0}.article .song{margin-top:64px}
.article .song-index a{display:flex;gap:16px}.article .language-heading{font-weight:600}
@media(max-width:600px){.article .line-pair{display:block}.article .translation{margin-bottom:1em}.article .language-heading{display:none}}

/* Robotics icon is 50% larger than the other 72px icons. */
.tile .icon[src="/assets/icons/robotics-icon.jpg"]{width:108px;height:108px}

/* Enlarge article content, including text and media, by 50%. */
.article{zoom:1.5}

/* Photo tiles are independent of the fading background and theme icon filters. */
.project-tile .project-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.project-tile .outline{z-index:2}
.project-tile::after{content:"";position:absolute;inset:0;background:#808080;opacity:0;z-index:1;pointer-events:none;transition:opacity .18s}
.project-tile:hover::after,.project-tile:focus-visible::after{opacity:.15}
.article [id]{scroll-margin-top:24px}

/* Unlinked tiles display their icon without advertising a navigation action. */
.unlinked-tile{cursor:default}
.unlinked-tile:hover{background:var(--paper)}

/* Keep the headstand's enlarged size when its tile position changes. */
.tile .icon[src="/assets/icons/headstand-icon.png"]{width:162px;height:162px}

.rose-tile .rose-static,.rose-tile canvas{position:absolute;width:85%!important;height:85%!important;inset:7.5%;pointer-events:none}
.rose-tile.rose-running .rose-static{visibility:hidden}

.tile-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;opacity:0}
.video-running .tile-video{opacity:1}
.tile[data-tile-index="18"] .tile-video,
.tile[data-tile-index="18"] .project-image{filter:brightness(1.2)}

/* Keep the embedded player >=200px tall; clip it to the clickable hexagon. */
.tile-youtube{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(178%,356px);height:100%;min-height:200px;border:0;pointer-events:none;opacity:0}
.youtube-running .tile-youtube{opacity:1}

/* Only the hovered/focused core tile's satellites become fully visible. */
#cluster{--satellite-opacity:.4}
#tile-group-outline{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.tile.satellite-tile{opacity:var(--satellite-opacity);transition:background .18s,opacity .2s}
.tile.core-tile .outline{stroke-width:2.25}
.tile.core-tile:focus-visible .outline{stroke-width:4}
@media(min-width:701px){
 #cluster[data-active-core]:not([data-active-core=""]) .core-tile .outline{stroke-width:1.5}
}
#cluster[data-active-core="6"] .satellite-tile[data-parent-tile="6"],
#cluster[data-active-core="1"] .satellite-tile[data-parent-tile="1"],
#cluster[data-active-core="3"] .satellite-tile[data-parent-tile="3"],
#cluster[data-active-core="4"] .satellite-tile[data-parent-tile="4"],
#cluster[data-active-core="5"] .satellite-tile[data-parent-tile="5"]{opacity:1}

/* Portrait first on small screens; beside the poem on desktop. */
.poem-feature{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.article .poem-feature-image{width:100%;max-width:320px;height:auto;justify-self:center}
.poem-feature-text{min-width:0}
@media(max-width:700px){
 #tile-group-outline{display:none}
 #cluster .tile.core-tile .outline{stroke-width:4.5}
 #cluster .tile{clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
 #cluster .satellite-tile{opacity:1}
 #cluster .tile:hover,#cluster .tile:focus-visible{background:var(--paper)}
 #cluster .project-tile:hover::after,#cluster .project-tile:focus-visible::after{opacity:0}
 #cluster .tile .icon,#cluster .tile .icon-pair{width:36px;height:36px}
 #cluster .tile .icon[src="/assets/icons/robotics-icon.jpg"]{width:54px;height:54px}
 #cluster .tile .icon[src="/assets/icons/headstand-icon.png"]{width:81px;height:81px}
}
@media(min-width:900px){
 .poem-feature{grid-template-columns:minmax(0,1fr) minmax(180px,.65fr);gap:32px}
 .poem-feature-text{grid-column:1;grid-row:1}
 .poem-feature-image{grid-column:2;grid-row:1}
}

/* Robotics mobile reading layout, adapted from the original fluid article. */
@media(max-width:980px){
 .article.robotics-article{zoom:1;width:auto;max-width:none;margin:24px 12px 48px;padding:20px 16px;font-size:16px;line-height:1.65}
 .robotics-article h1{font-size:36px;line-height:1.15;letter-spacing:-1px;overflow-wrap:break-word}
 .robotics-article h2{font-size:26px;line-height:1.3;overflow-wrap:break-word}
 .robotics-article h3{font-size:20px;line-height:1.35}
 .robotics-article p,.robotics-article li{line-height:1.65}
 .robotics-article ul,.robotics-article ol{padding-left:24px}
 .robotics-article img,.robotics-article video{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
 .robotics-article .row_custom,.robotics-article .two_imgs_horizontal,.robotics-article .three_imgs_horizontal{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px}
 .robotics-article .column_custom,.robotics-article .two_imgs_horizontal>*,.robotics-article .three_imgs_horizontal>*{min-width:0;width:100%;max-width:100%}
 .robotics-article .ssd-image-text-container{display:flex;flex-direction:column;gap:16px}
 .robotics-article .ssd-image-text-container>img,.robotics-article .ssd-text-container{width:100%;max-width:100%;min-width:0}
 .robotics-article .background-toggle{white-space:normal;overflow-wrap:break-word}
 .robotics-article .expandable-background{margin:20px 0;padding-left:12px}
}
