/* williampark.org homepage — the Chip Floorplan layout.
   Shared tokens/chrome live in site.css; this file styles index.html only. */

/* --- identity line under the head-bar --- */
.id-line { margin-top: 10px; color: var(--ink-2); letter-spacing: 0.03em; max-width: 52ch; }

/* --- floorplan + index --- */
.plan-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.plan-panel { min-width: 0; }
.plan-svg { display: block; width: 100%; height: auto; }
.plan-svg .block-link { outline: none; text-decoration: none; }
.plan-svg .block { cursor: pointer; touch-action: manipulation; }
/* Hover-dimming only where hovering exists; on touch it just stutters into navigation. */
@media (hover: hover) {
  .plan-svg .block { transition: opacity 0.18s ease-out; }
  .plan-svg.has-active .block:not(.is-active) { opacity: 0.3; }
}
.plan-svg .block:active { opacity: 0.7; transition: none; }
.plan-svg .block-code {
  font-family: inherit;
  font-weight: 700;
  pointer-events: none;
  paint-order: stroke;
}
.plan-svg .block-fill { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .plan-svg .block-fill {
    animation: register 0.24s cubic-bezier(0.16, 0.84, 0.3, 1) both;
    animation-delay: var(--d, 0ms);
  }
}
@keyframes register { from { opacity: 0; } }

.plan-caption {
  margin-top: 12px;
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* index: the real, crawlable project list */
.legend { list-style: none; border-top: 1px solid var(--rule-strong); }
.legend-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  touch-action: manipulation;
}
@media (hover: hover) {
  .legend-row { transition: background-color 0.18s ease-out; }
  .legend-row.is-active { background: rgba(34, 38, 42, 0.05); }
}
.legend-row:active { background: rgba(34, 38, 42, 0.09); transition: none; }
.swatch {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  background: var(--bin);
  border: 2px solid var(--ink);
}
.swatch-live { border-style: dashed; }
.legend-main { min-width: 0; }
.legend-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.legend-link { font-weight: 700; letter-spacing: 0.04em; text-decoration: none; border-bottom: 1px solid var(--rule); }
@media (hover: hover) {
  .legend-link:hover { border-bottom-color: var(--ink); }
}
.legend-tagline { color: var(--ink-2); margin-top: 4px; max-width: 52ch; }
.legend-metric { margin-top: 6px; letter-spacing: 0.03em; }
.legend-date { color: var(--ink-2); letter-spacing: 0.04em; white-space: nowrap; }
.legend-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.legend-src { text-decoration: none; letter-spacing: var(--track); text-transform: uppercase; border-bottom: 1px solid var(--rule); }
@media (hover: hover) {
  .legend-src:hover { border-bottom-color: var(--ink); }
}

.noscript-list { list-style: none; }
.noscript-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }

/* --- work experience on one dated axis --- */
.traveler { list-style: none; }
.traveler-row {
  display: grid;
  grid-template-columns: 150px 28px 1fr;
  gap: 0 18px;
}
.trav-date {
  text-align: right;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.trav-axis { position: relative; }
.trav-axis::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}
.traveler-row:first-child .trav-axis::before { top: 6px; }
.traveler-row:last-child .trav-axis::before { bottom: auto; height: 24px; }
.trav-node {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 11px;
  height: 11px;
  transform: translateX(-50%);
  background: var(--ink);
  border: 2px solid var(--ink);
}
.trav-node-live { background: var(--paper); border-style: dashed; }
.trav-body { padding-bottom: 34px; min-width: 0; }
.trav-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.trav-id { display: flex; align-items: center; gap: 12px; }
.trav-logo { width: 26px; height: 26px; object-fit: cover; border: 1px solid var(--rule); }
.trav-org { font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.trav-sub { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.trav-role { font-weight: 700; letter-spacing: 0.04em; color: var(--ink); }
.trav-loc { color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase; }
.trav-summary { margin-top: 10px; max-width: 68ch; color: var(--ink); }

/* --- responsive --- */
@media (max-width: 920px) {
  .plan-grid { grid-template-columns: 1fr; }
  /* Stacked: the index (the real action) leads; the die follows. */
  .legend-panel { order: -1; }
  /* The section rule already frames the stacked index; drop its own top rule. */
  .legend { border-top: none; }
  .plan-panel { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .traveler-row { grid-template-columns: 20px 1fr; }
  .trav-date { grid-column: 2; text-align: left; padding-top: 0; margin-bottom: 4px; }
  .trav-axis { grid-column: 1; grid-row: 1 / span 2; }
  .trav-body { grid-column: 2; }
}
