/* Page layout and content. All illustration geometry lives in art/*.js. */
:root { color-scheme: light; }
html { background: #ead7af; }
body {
  margin: 0;
  padding: 24px max(12px, env(safe-area-inset-right)) 24px max(12px, env(safe-area-inset-left));
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
#rowan-site {
  --ink: #25222c;
  --paper: #fff3cb;
  --accent: #a63132;
  --rz-display-font: 'Chewy', 'Comic Sans MS', sans-serif;
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  border: 3px solid var(--ink);
  border-radius: 4px 8px 4px 7px;
  background: #f1d59e;
  color: var(--ink);
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
}
#rowan-site * { box-sizing: border-box; }
#rowan-site [hidden] { display: none !important; }
#rowan-site a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
#rowan-site a:hover { color: #146560; }
#rowan-site :is(a, button, summary) { touch-action: manipulation; }
#rowan-site :focus-visible { outline: 3px dashed #146560; outline-offset: 4px; }
.rz-skip { position: absolute; left: 16px; top: -80px; z-index: 5; }
.rz-skip:focus { top: 8px; padding: 12px; background: #fff3cb; color: #25222c; }

/* Without JavaScript the title, links and every content section remain visible. */
#rowan-site .rz-scene { position: relative; background: #67cce6; min-height: 110px; }
#rowan-site .rz-masthead { padding: 16px 22px 0; }
#rowan-site h1 {
  margin: 0;
  color: var(--ink);
  font: 400 48px/1.08 'Special Elite', 'Courier New', monospace;
  letter-spacing: 0;
  white-space: nowrap;
}
#rowan-site .rz-social { padding: 0 22px 8px; font: 400 22px/1.2 var(--rz-display-font); }
#rowan-site .rz-social a { display: inline-flex; align-items: center; min-height: 44px; padding-right: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
#rowan-site .rz-social-handle { text-decoration: underline; text-decoration-thickness: 1.5px; }
#rowan-site .rz-cityscape { display: none; width: 100%; height: 100%; }
#rowan-site[data-scene-ready] .rz-cityscape { display: block; }
#rowan-site[data-scene-ready] .rz-masthead {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 2;
  padding: 12px 22px 0;
  pointer-events: none;
}
#rowan-site[data-scene-ready] .rz-social { position: absolute; z-index: 3; padding: 0; }
#rowan-site .rz-hotspot { position: absolute; background: transparent; border: 0; border-radius: 26%; padding: 0; }
#rowan-site .rz-hotspot:focus-visible { outline-color: #fff6a3; outline-offset: 1px; background: #fff6a322; }

/* The order of these links is also the left-to-right order of the scene. */
#rowan-site .rz-inventory {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px 9px;
  background: var(--paper);
  border-top: 5px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  scroll-margin-top: 8px;
}
#rowan-site .rz-inventory a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 2px 6px;
  min-width: 0;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font: 400 21px/1.15 var(--rz-display-font);
}
#rowan-site[data-scene-ready] .rz-inventory a { min-height: 80px; }
#rowan-site .rz-inventory a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #eab557;
  clip-path: polygon(3% 10%, 89% 1%, 98% 90%, 13% 100%);
  opacity: 0;
}
#rowan-site .rz-inventory a[aria-current=page]::before { opacity: .7; }
#rowan-site .rz-inventory a span { position: relative; overflow-wrap: anywhere; }
#rowan-site .rz-inventory canvas { display: none; position: relative; width: 90px; height: 63px; max-width: 100%; }
#rowan-site .rz-inventory canvas[data-ready] { display: block; }
@media (hover: hover) and (pointer: fine) {
  #rowan-site .rz-inventory a:hover::before { opacity: .3; }
  #rowan-site .rz-inventory a[aria-current=page]:hover::before { opacity: .7; }
}

/* Ordinary HTML content stays editable independently of the Canvas drawings. */
#rowan-site .rz-panel { position: relative; padding: 24px 34px 30px; background: var(--paper); min-height: 175px; scroll-margin-top: 12px; }
#rowan-site .rz-panel + .rz-panel { border-top: 2px solid var(--ink); }
#rowan-site[data-enhanced] .rz-panel { border-top: 0; }
#rowan-site .rz-panel::before { content: ''; position: absolute; left: 14px; top: 23px; bottom: 26px; border-left: 2px solid #cf8976; opacity: .65; }
#rowan-site h2 { margin: 0 0 16px; font: 400 34px/1.1 var(--rz-display-font); letter-spacing: .8px; }
#rowan-site .rz-panel :is(p, li) { margin: 0 0 13px; font-size: 16px; line-height: 1.55; }
#rowan-site .rz-panel ul { padding-left: 23px; margin: 0; }
#rowan-site .rz-panel li { padding-left: 3px; }
#rowan-site img { display: block; max-width: 100%; height: auto; }
#rowan-site .rz-home-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(144px, 24vw, 210px); align-items: start; gap: 24px; }
#rowan-site .rz-home-copy { min-width: 0; }
#rowan-site .rz-home-copy p:last-child { margin-bottom: 0; }
#rowan-site .rz-home-photo {
  display: block;
  width: 100%;
  margin: 3px 0 4px;
  padding: 7px 7px 18px;
  background: #fff9e9;
  border: 2px solid var(--ink);
  border-radius: 2px 5px 2px 4px;
  box-shadow: 4px 5px 0 #b89665;
  transform: rotate(-1deg);
}
#rowan-site .rz-home-photo img { width: 100%; }

/* The existing paper images remain visible even when the abstract is closed. */
#rowan-site .rz-publication { border-top: 1px solid #aa936b; padding: 13px 0; scroll-margin-top: 18px; }
#rowan-site .rz-publication summary {
  display: grid;
  grid-template-columns: 12px 100px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  margin-left: 0;
  padding-block: 8px;
  min-height: 80px;
  font: 400 25px/1.2 var(--rz-display-font);
  overflow-wrap: anywhere;
}
#rowan-site .rz-publication summary::-webkit-details-marker { display: none; }
#rowan-site .rz-publication summary::before { content: ''; width: 10px; height: 13px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
#rowan-site .rz-publication[open] summary::before { transform: rotate(90deg); }
#rowan-site .rz-pub-thumb { width: 100px; max-height: 90px; object-fit: contain; background: #fff9e9; border: 1px solid #aa936b; padding: 3px; }
#rowan-site .rz-publication[open] summary { margin-bottom: 12px; }
#rowan-site .rz-pub-detail { padding-left: 18px; }
#rowan-site .rz-pub-detail :is(.rz-authors, .rz-venue) { font-size: 13px; line-height: 1.5; margin: 6px 0; }
#rowan-site .rz-pub-detail .rz-venue { font-family: 'Courier New', monospace; }
#rowan-site .rz-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
#rowan-site .rz-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 5px 8px; border: 1.5px solid var(--ink); background: #f5d693; box-shadow: 2px 2px 0 var(--ink); text-decoration: none; font: 400 19px/1.2 var(--rz-display-font); }
#rowan-site .cool { color: var(--accent); }
#rowan-site .rz-panel .rz-blog-list { list-style: none; padding: 0; }
#rowan-site .rz-blog-item { display: flex; gap: 18px; border-top: 1px solid #aa936b; padding: 18px 0 8px; }
#rowan-site .rz-blog-copy { min-width: 0; flex: 1; }
#rowan-site .rz-blog-item h3 { margin: 0 0 8px; font: 400 26px/1.2 var(--rz-display-font); }
#rowan-site .rz-blog-thumb { width: 130px; height: 110px; object-fit: cover; border: 2px solid var(--ink); padding: 3px; background: #fff9e9; }
#rowan-site .rz-blog-copy .date { display: block; margin-bottom: 9px; font-size: 14px; }
#rowan-site .rz-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#rowan-site .rz-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 26px max(8px, env(safe-area-inset-bottom)); border-top: 2px solid var(--ink); background: #dba96a; font: 400 14px/1.4 var(--rz-display-font); }
#rowan-site .rz-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }

/* Match the approved phone view; leave labels and touch targets at readable sizes. */
@media (max-width: 626px) {
  body { padding: 10px max(8px, env(safe-area-inset-right)) 10px max(8px, env(safe-area-inset-left)); }
  #rowan-site h1 { font-size: 36px; }
  #rowan-site .rz-masthead, #rowan-site[data-scene-ready] .rz-masthead { padding: 12px 16px 0; }
  #rowan-site .rz-social { font-size: 17px; }
  #rowan-site .rz-inventory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 7px 4px; }
  #rowan-site .rz-inventory a { font-size: 19px; padding: 3px 0 6px; }
  #rowan-site[data-scene-ready] .rz-inventory a { min-height: 76px; }
  #rowan-site .rz-inventory canvas { width: 70px; height: 49px; }
  #rowan-site .rz-panel { padding: 22px 19px 22px 26px; }
  #rowan-site h2 { font-size: 30px; }
  #rowan-site .rz-publication summary { font-size: 23px; grid-template-columns: 10px 76px minmax(0, 1fr); gap: 8px; }
  #rowan-site .rz-pub-thumb { width: 76px; max-height: 76px; }
  #rowan-site .rz-pub-detail { padding-left: 7px; }
  #rowan-site .rz-pub-detail :is(.rz-authors, .rz-venue) { font-size: 14px; }
  #rowan-site .rz-blog-item { gap: 12px; }
  #rowan-site .rz-blog-thumb { width: 80px; height: 80px; }
  #rowan-site .rz-footer { padding: 5px 15px max(5px, env(safe-area-inset-bottom)); font-size: 13px; }
}
@media (max-width: 440px) {
  #rowan-site .rz-home-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #rowan-site .rz-home-photo { width: min(100%, 188px); margin-inline: auto; }
}
@media (max-width: 372px) {
  #rowan-site h1 { font-size: 30px; }
  #rowan-site .rz-inventory a { font-size: 17px; }
  #rowan-site .rz-blog-item { flex-direction: column; }
  #rowan-site .rz-blog-thumb { width: 100%; height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  #rowan-site * { scroll-behavior: auto; transition: none; }
}

/* Only real pointing devices get the native game cursor; touch needs no overlay. */
@media (any-hover: hover) and (any-pointer: fine) {
  #rowan-site[data-spy-cursor] { cursor: var(--rz-cursor-idle, auto); }
  #rowan-site[data-spy-cursor] :is(a[href], button:enabled, summary),
  #rowan-site[data-spy-cursor] :is(a[href], button:enabled, summary) * { cursor: var(--rz-cursor-active, pointer); }
}
@media print {
  body { padding: 0; background: white; }
  #rowan-site { border: 0; max-width: none; }
  #rowan-site .rz-scene { height: auto !important; }
  #rowan-site[data-scene-ready] .rz-masthead { position: static; }
  #rowan-site :is(.rz-cityscape, .rz-hotspot, .rz-social, .rz-inventory, .rz-footer) { display: none !important; }
  #rowan-site .rz-panel[hidden] { display: block !important; }
}
