/* Styles that belong to one page or one feature. */

/* ---------- neural network SVG ---------- */
.net-edge { stroke: #1b1b1b; stroke-width: 1; transition: stroke .6s ease, stroke-opacity .6s ease; }
.net-edge--warm { stroke: var(--accent); }
.net-edge--hot { stroke: var(--accent); stroke-width: 1.5; stroke-opacity: 1; stroke-dasharray: 6 6; animation: flow 1.2s linear infinite; }
.net-node { fill: var(--bg); stroke: #2f2f2f; stroke-width: 1.5; }
.net-glow { fill: var(--accent); opacity: 0; transition: opacity .6s ease; }
.net-halo { fill: none; stroke: var(--accent); stroke-opacity: 0; transform-box: fill-box; transform-origin: center; transition: stroke-opacity .6s ease; }
.net-halo.is-on { stroke-opacity: .35; animation: pulse 2.4s ease-in-out infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .net-edge--hot { animation-duration: 4s; }
  .net-halo.is-on { animation-duration: 6s; }
}

/* ---------- feed ---------- */
.profile { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.profile__head { display: flex; gap: 14px; align-items: center; }
.profile__avatar {
  width: 72px; height: 72px; flex: none; object-fit: cover;
  border: 2px solid var(--accent); box-shadow: 4px 4px 0 var(--bar); background: var(--bg);
}
.profile__id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile__name { font-size: 26px; line-height: 1.05; }
.profile__handle { font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.profile .kv { font-size: 12px; line-height: 1.7; padding: 10px 12px; }

.post__head { display: flex; flex-direction: column; gap: 4px; }
.post__title { font: 500 13px/1.3 var(--font-mono); color: var(--text-ui); }
.post__title a { color: inherit; }
.post__date { font: 400 11px/1 var(--font-mono); color: var(--muted); }
.post__cover { width: 100%; max-height: 360px; object-fit: cover; border-bottom: 1px solid var(--border); }
.post__body { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.post__fallback { font: 400 11px/1.4 var(--font-mono); color: var(--muted); }
@media (max-width: 520px) { .post__body { padding: 18px; } }

.now { display: flex; flex-direction: column; gap: 10px; font: 400 13px/1.6 var(--font-mono); color: var(--text); }
.now dt { color: var(--muted); }
.now dd { margin: 0; }

/* ---------- code ---------- */
.readme { font-size: 16px; line-height: 1.65; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--gap); }
.project { display: flex; flex-direction: column; }
.project__snippet { min-height: 120px; border: none; border-bottom: 1px solid var(--border); white-space: pre-wrap; font-size: 12px; }
.project__body { padding: 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.project__desc { font-size: 15px; line-height: 1.6; }
.project__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; font: 500 13px/1 var(--font-mono); }
.project__links a { display: inline-flex; align-items: center; min-height: var(--touch); }
.project__lang { font: 400 12px/1 var(--font-mono); color: var(--muted); }
.project--featured .panel__title::after { content: '★'; color: var(--accent); font-size: 11px; }

/* ---------- log ---------- */
.year { display: flex; align-items: center; gap: 14px; margin: 8px 0 4px; font-size: 26px; }
.year::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.entry { display: grid; grid-template-columns: 96px 24px minmax(0, 1fr); gap: 14px; align-items: start; }
.entry__when { padding-top: 18px; font: 400 12px/1.4 var(--font-mono); color: var(--muted); text-align: right; }
.entry__rail { position: relative; align-self: stretch; display: flex; justify-content: center; }
.entry__rail::before { content: ''; position: absolute; top: 0; bottom: -18px; width: 1px; background: var(--border-strong); }
.entry__dot { position: relative; margin-top: 18px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); }
.entry--hl .entry__dot { background: var(--accent); }
.entry__card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.entry__hash { color: var(--accent-soft); }
.entry__title { font-size: 20px; line-height: 1.25; }
.entry__title a { color: var(--text-strong); }
.entry__text { font-size: 15px; line-height: 1.6; }
@media (max-width: 560px) {
  .entry { grid-template-columns: 52px 16px minmax(0, 1fr); gap: 8px; }
}
.reading { list-style: none; margin: 0; padding: 0; font: 400 13px/1.5 var(--font-mono); }
.reading li { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.reading li:last-child { border-bottom: none; }
.reading__authors { color: var(--muted); }

/* ---------- resume ---------- */
.doc { padding: 36px 40px; display: flex; flex-direction: column; gap: 32px; }
.doc__header { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; border-bottom: 1px dashed var(--border-strong); }
.doc__name { font-size: 40px; line-height: 1.05; }
.doc__role { font: 400 16px/1.4 var(--font-mono); color: var(--accent); }
.doc__contact { font: 400 13px/1.6 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.doc__section { display: flex; flex-direction: column; gap: 16px; }
.doc__h { font-size: 20px; color: var(--accent); letter-spacing: .04em; }
.job { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.row__title { font: 400 19px/1.3 var(--font-title); color: var(--text-strong); }
.row__title span { color: var(--accent); }
.row__plain { font-size: 15px; color: var(--text-strong); }
.row__plain span { color: var(--text); }
.row__when { font: 400 12px/1.3 var(--font-mono); color: var(--muted); }
.job__note { font: 400 12px/1.5 var(--font-mono); color: var(--muted); }
.job ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.job li { margin: 0 0 6px; }
.skills { display: flex; flex-direction: column; gap: 14px; }
.skill { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: start; }
.skill__group { padding-top: 6px; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.langs { font: 400 14px/1.8 var(--font-mono); }
.langs span { color: var(--muted); }
@media (max-width: 640px) {
  .doc { padding: 24px 18px; }
  .skill { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--gap); }
.social-card { display: flex; flex-direction: column; color: var(--text); }
.social-card:hover { text-decoration: none; border-color: var(--accent); }
.social-card__body { padding: 20px 18px; display: flex; gap: 16px; align-items: center; }
.social-card__mono {
  width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent); box-shadow: 4px 4px 0 var(--bar);
  font: 700 18px/1 var(--font-mono); color: var(--accent);
}
.social-card__handle { font: 500 14px/1.3 var(--font-mono); color: var(--text-strong); overflow-wrap: anywhere; }
.social-card__desc { font-size: 14px; line-height: 1.5; color: var(--muted); }
.social-card--todo { opacity: .7; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; flex-wrap: wrap; gap: 18px; }
.form__row .field { flex: 1 1 220px; }
.field { display: flex; flex-direction: column; gap: 6px; font: 500 12px/1 var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.field input, .field textarea {
  font: 400 14px/1.5 var(--font-mono); color: var(--text-strong);
  background: var(--bg-deep); border: 1px solid var(--border-strong); padding: 12px 14px; min-height: var(--touch);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form__hint { font: 400 12px/1.5 var(--font-mono); color: var(--muted); }

/* ---------- play ---------- */
.game { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.game__left { flex: 0 1 380px; min-width: 260px; display: flex; flex-direction: column; gap: 14px; }
.game__right { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cell {
  aspect-ratio: 1; min-height: var(--touch); position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border-strong);
  font: 400 64px/1 var(--font-title); color: var(--text-ui); cursor: pointer;
}
.cell:hover:not(:disabled) { border-color: var(--accent-soft); }
.cell:disabled { cursor: default; }
.cell--model { color: var(--accent); }
.cell--best { background: var(--accent-wash); border-color: var(--accent); }
.cell--win { background: var(--accent-wash); border-color: var(--accent); }
.cell__score { position: absolute; right: 8px; bottom: 8px; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.cell--best .cell__score { color: var(--accent); }
.status { font: 400 13px/1.6 var(--font-mono); color: var(--text); min-height: 1.6em; }
.status strong { color: var(--accent); font-weight: 400; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.bar-row__track { height: 10px; background: var(--bar); position: relative; }
.bar-row__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--dim-node); transition: width .3s ease; }
.bar-row--best .bar-row__fill { background: var(--accent); }
.bar-row--best { color: var(--accent); }
.bar-row__value { text-align: right; }
.results { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; }
.result__label { display: flex; justify-content: space-between; gap: 8px; font: 400 13px/1.4 var(--font-mono); color: var(--text); }
.result__bar { display: flex; height: 8px; margin-top: 6px; background: var(--bar); }
.result__bar span:nth-child(1) { background: var(--accent); }
.result__bar span:nth-child(2) { background: var(--accent-soft); }
.result__bar span:nth-child(3) { background: #3a3a3a; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font: 400 11px/1 var(--font-mono); color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ---------- ask ---------- */
.search { display: flex; border: 1px solid var(--accent); background: var(--bg-deep); }
.search__prompt { display: flex; align-items: center; padding-left: 16px; font: 500 16px/1 var(--font-mono); color: var(--accent); }
.search input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 14px;
  font: 400 16px/1 var(--font-mono); color: var(--text-strong); background: transparent; border: none;
}
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search .btn { border: none; min-height: 52px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.suggest .chip { min-height: 36px; cursor: pointer; }
.suggest .chip:hover { border-color: var(--accent); color: var(--text-strong); }
.mode { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; font: 400 12px/1.5 var(--font-mono); color: var(--muted); }
.hits { display: flex; flex-direction: column; gap: 12px; }
.hit { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.hit:hover { border-color: var(--accent); text-decoration: none; }
.hit__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.hit__title { display: flex; gap: 10px; align-items: baseline; font: 400 20px/1.1 var(--font-title); color: var(--text-strong); }
.hit__src { font: 400 12px/1 var(--font-mono); color: var(--muted); }
.hit__score { display: flex; gap: 10px; align-items: center; font: 400 12px/1 var(--font-mono); color: var(--accent); }
.hit__track { width: 120px; height: 6px; background: var(--bar); position: relative; }
.hit__fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.hit__text { font-size: 15px; line-height: 1.6; }
.steps { margin: 0; padding: 18px 18px 18px 38px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.6; }

/* ---------- print (resume → PDF) ---------- */
/* ---------- print: the resume as a clean A4 document ----------
   Only the resume itself prints. Site chrome, side column and extra panels stay hidden. */
@media print {
  @page { size: A4; margin: 14mm 16mm; }
  html, body { background: #fff !important; color: #1a1a1a; }
  body { font: 400 9.5pt/1.45 'IBM Plex Sans', Arial, sans-serif; }
  .shellbar, .tabs, .rule, .hero, .footer, .page__side, .skip-link, .info-row, .panel__bar { display: none !important; }
  .container, .page, .page__main, .columns__main { display: block; padding: 0; margin: 0; max-width: none; animation: none !important; }
  .panel { border: none; background: none; box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3, h4 { font-family: 'IBM Plex Sans', Arial, sans-serif; color: #111; }

  .doc { padding: 0; gap: 11pt; }
  .doc__header { gap: 2pt; padding-bottom: 8pt; border-bottom: 1.2pt solid #111; }
  .doc__name { font-size: 22pt; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; color: #111; }
  .doc__role { font: 500 11pt/1.3 'IBM Plex Sans', Arial, sans-serif; color: #2f5a17; }
  .doc__contact { font: 400 8.5pt/1.4 'IBM Plex Sans', Arial, sans-serif; color: #444; }

  .doc__section { gap: 6pt; }
  .doc__h { font-size: 9pt; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: #2f5a17;
            padding-bottom: 2pt; border-bottom: .6pt solid #c8c8c8; }
  .doc__hash { display: none; }
  .doc__section > p { font-size: 9.5pt !important; line-height: 1.5 !important; color: #222; }

  .job { gap: 2pt; break-inside: avoid; margin-bottom: 4pt; }
  .row { gap: 0 10pt; }
  .row__title { font: 600 10.5pt/1.3 'IBM Plex Sans', Arial, sans-serif; color: #111; }
  .row__title span { font-weight: 400; color: #333; }
  .doc__section > .row { margin: 0; }
  .doc__section:has(> .row) { gap: 3pt; }
  .row__plain { font-size: 9.5pt; color: #111; }
  .row__plain span { color: #333; }
  .row__when { font: 400 8.5pt/1.3 'IBM Plex Sans', Arial, sans-serif; color: #555; white-space: nowrap; }
  .job__note { font: italic 400 8.5pt/1.4 'IBM Plex Sans', Arial, sans-serif; color: #555; }
  .job ul { padding-left: 13pt; font-size: 9.5pt; line-height: 1.45; }
  .job li { margin: 0 0 2pt; color: #222; }
  .job p { font-size: 9.5pt !important; line-height: 1.45 !important; color: #222; }

  .skills { gap: 3pt; }
  .skill { grid-template-columns: 26mm minmax(0, 1fr); gap: 8pt; break-inside: avoid; }
  .skill__group { padding-top: 1pt; font: 600 7.5pt/1.45 'IBM Plex Sans', Arial, sans-serif; color: #111; text-transform: uppercase; letter-spacing: .06em; }
  .skill .chips { display: block; }
  .skill .chip { display: inline; padding: 0; border: none; background: none; font: 400 9.5pt/1.45 'IBM Plex Sans', Arial, sans-serif; color: #222; }
  .skill .chip + .chip::before { content: ' · '; color: #888; }

  .langs { font: 400 9.5pt/1.5 'IBM Plex Sans', Arial, sans-serif; color: #111; }
  .langs span { color: #555; }
}

/* ---------- compact side column ---------- */
.page__side .kv { font-size: 12px; line-height: 1.7; padding: 12px 14px; }
.page__side .panel__body { padding: 14px; }
.page__side .chips { gap: 6px; }
.page__side .chip { padding: 4px 8px; font-size: 11px; }
.page__side .link-list { padding: 4px 0; font-size: 13px; }
.page__side .link-list a { min-height: 36px; padding: 0 14px; }
.page__side .results { padding: 12px 14px; gap: 10px; }
.page__side .steps { padding: 12px 14px 12px 32px; font-size: 13px; gap: 6px; }

/* Row of small panels inside the main column (log stats, resume export, model card…). */
.info-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--gap); align-items: start; }
.info-row .kv { font-size: 12px; line-height: 1.7; padding: 12px 14px; }
.info-row .results { padding: 12px 14px; gap: 10px; }
.info-row .steps { padding: 12px 14px 12px 32px; font-size: 13px; gap: 6px; }
