/* About page. Builds on the tokens and components in styles.css. */

[hidden] { display: none !important; }

.about { max-width: 1100px; margin: 0 auto; padding: 120px var(--gutter) 0; position: relative; z-index: 2; }

/* ---------- intro ---------- */
.intro { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 56px; align-items: start; }
.photo {
  margin: 0; overflow: hidden;
  background: #040706; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(61, 255, 138, .06);
}
.photo .term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.photo .term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--pipe-edge); }
.photo .term-bar span { margin-left: auto; color: var(--dim); font-size: .7rem; }
.photo img { display: block; width: 100%; height: auto; }

.intro-text h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; letter-spacing: -.05em; margin: 0 0 18px; }
.intro-text > p { max-width: 60ch; color: var(--muted); }
.lead { color: var(--text) !important; font-size: clamp(1.1rem, 2.2vw, 1.35rem); line-height: 1.5; margin: 0 0 12px; }
.lead::before { content: "> "; color: var(--accent); font-family: var(--mono); }

.facts { margin: 26px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 6px; background: var(--surface); font-size: .82rem; }
.facts div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 3px 0; }
.facts dt { color: var(--dim); }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; color: var(--text); }

.intro-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
button.btn { background: none; cursor: pointer; font-family: var(--mono); }
button.btn.primary { background: var(--accent); }

/* ---------- explorer ---------- */
.explorer {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  margin-top: 96px; min-height: 620px;
  background: #040706; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  scroll-margin-top: 80px;
}
html:not(.js) .tree, html:not(.js) .pane-bar { display: none; }
html:not(.js) .explorer { grid-template-columns: 1fr; }

.tree { display: flex; flex-direction: column; padding: 18px 0; border-right: 1px solid var(--line); }
.tree-root { margin: 0 0 8px; padding: 0 18px; color: var(--dim); font-size: .8rem; }
.tree-hint { margin: auto 0 0; padding: 16px 18px 0; color: var(--dim); font-size: .68rem; }
.tree [role="tab"] {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; border: 0; border-left: 2px solid transparent;
  background: none; color: var(--muted); font: 500 .9rem var(--mono); text-align: left; cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.tree .br { color: var(--pipe-edge); }
.tree kbd { margin-left: auto; font: .65rem var(--mono); color: var(--dim); padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; }
.tree [role="tab"]:hover { color: var(--text); }
.tree [aria-selected="true"] { color: var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }
.tree [aria-selected="true"] .br { color: var(--accent); }

.pane { min-width: 0; display: flex; flex-direction: column; }
.pane-bar { padding: 12px 24px; border-bottom: 1px solid var(--line); color: var(--text); font-size: .8rem; }
.pane-prompt { color: var(--accent); }
.pane-bar .caret { height: 1em; }

.panel { padding: 32px 36px 40px; outline: none; }
.panel.enter { animation: rise .45s ease both; }
.panel h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 14px; }
.panel h3 { margin: 34px 0 10px; font-size: 1.05rem; }
.panel h3.mono { color: var(--accent); font-size: .85rem; font-weight: 500; }
.panel p { max-width: 64ch; }
.panel .tags { margin: 14px 0 0; }
.panel blockquote {
  margin: 26px 0 0; padding: 4px 0 4px 18px; max-width: 64ch;
  border-left: 2px solid var(--accent); color: var(--text); font-size: 1.05rem;
}

/* ---------- stats ---------- */
.stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 24px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 120px; max-width: 220px; }
.stat b { color: var(--accent); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; text-shadow: 0 0 32px rgba(61, 255, 138, .3); }
.stat span { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.stat-arrow { color: var(--dim); font-size: 1.6rem; }

/* ---------- hockey route ---------- */
.route { position: relative; margin: 36px 0 12px; }
.route ol { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
.route li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.route li b { margin-top: 10px; font-size: .92rem; color: var(--muted); transition: color .3s; }
.route li span:not(.dot) { font-size: .75rem; color: var(--dim); }
.route .dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--pipe-edge);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.route li.reached .dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 0 22px rgba(61, 255, 138, .4); }
.route li.reached b { color: var(--text); }
.route-track { position: absolute; left: 10%; right: 10%; top: 8px; height: 6px; border-radius: 3px; background: var(--pipe); box-shadow: 0 0 0 2px var(--pipe-edge); }
.route-fill { height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(var(--p)); transition: transform .5s ease; }

.replay {
  margin-top: 14px; padding: 6px 14px; cursor: pointer;
  background: none; color: var(--text); font-size: .78rem;
  border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s;
}
.replay:hover { border-color: var(--accent); }

/* ---------- chaos canvas ---------- */
.chaos { margin: 18px 0 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.chaos canvas { display: block; width: 100%; height: 150px; }
.chaos figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: var(--dim); font-size: .72rem; }
.chaos figcaption b { color: var(--accent); font-weight: 500; }
.chaos button { background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font: inherit; padding: 4px 12px; cursor: pointer; }
.chaos button:hover { border-color: var(--accent); }

/* ---------- awards ---------- */
.awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.awards li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.awards b { font-weight: 600; }
.awards b::before { content: "★ "; color: var(--accent); }
.awards span { color: var(--muted); font-size: .88rem; line-height: 1.45; }

/* ---------- work ---------- */
.system { margin: 26px 0 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.system h3 { margin: 4px 0 10px; font-size: 1.2rem; }
.system p { color: var(--muted); }

.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; margin: 22px 0; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sources li { font-size: .72rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--bg-2); }
.flow.run .sources li { animation: ping 2.4s ease-in-out infinite; }
.flow.run .sources li:nth-child(2n) { animation-delay: .3s; }
.flow.run .sources li:nth-child(3n) { animation-delay: .6s; }
@keyframes ping { 50% { border-color: var(--accent); color: var(--text); } }

.flow-pipe { position: relative; width: 90px; height: 8px; border-radius: 4px; background: var(--pipe); box-shadow: 0 0 0 2px var(--pipe-edge); }
.flow-pipe::after {
  content: ""; position: absolute; inset: 2px 0; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 14px);
  animation: slide .8s linear infinite;
}
@keyframes slide { to { background-position: 14px 0; } }
.flow-pipe span { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 90px; text-align: center; font-size: .62rem; line-height: 1.3; color: var(--dim); }

.entry { padding: 14px 16px; background: #040706; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; }
.entry-head { display: flex; justify-content: space-between; margin: 0 0 8px; color: var(--accent); }
.entry-head em { font-style: normal; color: var(--dim); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.entry dl { margin: 0; }
.entry dl div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 3px 0; border-top: 1px dashed var(--line); }
.entry dt { color: var(--dim); }
.entry dd { margin: 0; color: var(--text); min-height: 1.4em; }
.entry dd.typing::after { content: ""; display: inline-block; width: .5em; height: 1em; margin-left: 2px; background: var(--accent); vertical-align: -.15em; }

.layers { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; max-width: 420px; }
.layers { counter-reset: tier; }
.layers li:not(:last-child)::before { counter-increment: tier; content: counter(tier) "  "; color: var(--accent); }
.layers li {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2);
  font-size: .8rem; color: var(--text);
}
.layers li span { color: var(--dim); }
.layers li span::before { content: "· "; }
.layers li:last-child { color: var(--muted); border-style: dashed; }
#work.enter .layers li { animation: rise .45s ease both; }
#work.enter .layers li:nth-child(2) { animation-delay: .06s; }
#work.enter .layers li:nth-child(3) { animation-delay: .12s; }
#work.enter .layers li:nth-child(4) { animation-delay: .18s; }
#work.enter .layers li:nth-child(5) { animation-delay: .24s; }
#work.enter .layers li:nth-child(6) { animation-delay: .3s; }

/* ---------- built ---------- */
#built .shipped { margin-top: 18px; }

/* ---------- offline ---------- */
.hobbies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.hobbies li {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .25s, transform .25s;
}
.hobbies li:hover { border-color: var(--accent); transform: translateY(-2px); }
.glyph { color: var(--accent); font-size: 1.15rem; white-space: nowrap; }
.hobbies b { font-size: .85rem; font-weight: 500; }

.starter { display: flex; gap: 28px; align-items: center; margin-top: 30px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.starter-text p { margin: 0 0 6px; }
.starter-state { color: var(--accent); font-size: .8rem; margin-bottom: 14px !important; }
.starter-text .btn { display: inline-block; margin: 4px 8px 0 0; }
.jar {
  flex: none; position: relative; width: 70px; height: 96px; overflow: hidden;
  border: 2px solid var(--pipe-edge); border-top-width: 6px; border-radius: 8px 8px 14px 14px;
  background: var(--bg-2);
}
.dough {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(28% + var(--lvl, 0) * 17%);
  background: radial-gradient(circle at 30% 30%, rgba(3, 19, 10, .35) 2px, transparent 3px) 0 0 / 12px 12px, #e9dcc0;
  border-radius: 40% 40% 0 0 / 14px 14px 0 0;
  transition: height .6s cubic-bezier(.3, 1.5, .5, 1);
}

/* ---------- foot ---------- */
.about-foot { padding: 110px 0 6vh; text-align: center; }
.about-foot h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: -.03em; margin: 0; }

/* ---------- tablet / mobile ---------- */
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow-pipe { width: 8px; height: 46px; margin-left: 20px; }
  .flow-pipe::after { inset: 0 2px; background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 14px); animation-name: slide-y; }
  .flow-pipe span { top: 50%; left: 22px; transform: translateY(-50%); }
  .hobbies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@keyframes slide-y { to { background-position: 0 14px; } }

@media (max-width: 720px) {
  .about { padding-top: 88px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .photo { max-width: 220px; }
  .facts div { grid-template-columns: 68px 1fr; }

  .explorer { grid-template-columns: minmax(0, 1fr); margin-top: 64px; scroll-margin-top: 64px; }
  .tree {
    flex-direction: row; overflow-x: auto; padding: 0; gap: 0;
    border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .tree::-webkit-scrollbar { display: none; }
  .tree-root, .tree-hint, .tree .br, .tree kbd { display: none; }
  .tree [role="tab"] { flex: none; padding: 12px 14px; border-left: 0; border-bottom: 2px solid transparent; font-size: .82rem; }
  .tree [aria-selected="true"] { border-bottom-color: var(--accent); }
  .pane-bar { padding: 10px 16px; }
  .panel { padding: 24px 18px 30px; }
  .system { padding: 18px 16px; }
  .awards { grid-template-columns: 1fr; }

  /* the trip runs downward on small screens */
  .route ol { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 0; }
  .route li { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; gap: 0 12px; min-height: 58px; }
  .route li b { margin: 0; }
  .route li span:not(.dot) { flex-basis: 100%; padding-left: 34px; margin-top: -6px; }
  .route-track { left: 8px; right: auto; top: 10%; bottom: 10%; width: 6px; height: auto; }
  .route-fill { transform-origin: top; transform: scaleY(var(--p)); }

  .starter { flex-direction: column; align-items: flex-start; }
}

/* ---------- print: the whole thing, as a resume ---------- */
@media print {
  :root { --text: #111; --muted: #333; --dim: #666; --accent: #0a7a3c; --surface: #fff; --line: #ccc; --bg-2: #fff; }
  body { background: #fff; color: #111; font-size: 11pt; }
  body::before, .topbar, .tree, .pane-bar, .intro-cta, .replay, .chaos, .starter, .flow, .hobbies .glyph { display: none !important; }
  .about { padding: 0; max-width: none; }
  .intro { grid-template-columns: 140px 1fr; gap: 24px; }
  .photo { box-shadow: none; }
  .photo .term-bar { display: none; }
  .explorer { display: block; margin-top: 24px; border: 0; box-shadow: none; background: none; min-height: 0; }
  .panel[hidden] { display: block !important; }
  .panel { padding: 16px 0; break-inside: avoid-page; animation: none !important; }
  .stat b { text-shadow: none; }
  .route-track, .route .dot { display: none; }
  .route ol { grid-template-columns: repeat(5, 1fr); }
  .system, .awards li, .ship, .hobbies li { background: none; break-inside: avoid; }
  .about-foot { padding: 16px 0 0; text-align: left; }
  a { color: inherit; }
  .about-foot .cta { justify-content: flex-start; margin-top: 8px; }
  .about-foot .btn { padding: 0 16px 0 0; border: 0; background: none !important; color: var(--text) !important; box-shadow: none; }
}
