/* Tree-only revision. Portrait, biography, section layout and navigation stay original. */
#journeyTree { display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); gap: .5rem; height: min(550px, calc(100dvh - 220px)); min-height: 0; padding: .25rem 0; }
#journeyTree .journey-item { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 0; min-height: 0; margin: 0; align-items: stretch; }
#journeyTree .journey-node { grid-row: 1; grid-column: 2; align-self: center; width: 12px; height: 12px; border-radius: 2px; transform: rotate(45deg); background: var(--bg-primary); border: 2px solid var(--accent); box-shadow: 0 0 8px rgba(201,168,76,.4); transition: transform .22s ease, background .22s ease, box-shadow .22s ease, border-color .22s ease; }
#journeyTree .education .journey-node { border-color: #85b4ff; box-shadow: 0 0 8px rgba(133,180,255,.45); }
#journeyTree .journey-card { grid-row: 1; width: 100%; max-width: none; min-height: 0; padding: .5rem .85rem; border-radius: 12px; transform: none; --journey-shift: 0px; text-align: left; background: #30303d; border: 1px solid rgba(255,255,255,.12); box-shadow: none; display: flex; flex-direction: column; justify-content: center; }
#journeyTree .education .journey-card { grid-column: 1; border-left: 2.5px solid #85b4ff; }
#journeyTree .experience .journey-card { grid-column: 3; border-right: 2.5px solid var(--accent); }
#journeyTree .journey-card::before, #journeyTree .journey-card::after { content: none; }
#journeyTree .journey-card:hover, #journeyTree .journey-card:focus-visible { transform: translateY(-2px); background: #353543; box-shadow: none; border-color: var(--accent); }
#journeyTree .education .journey-card:hover, #journeyTree .education .journey-card:focus-visible { border-color: #a8c8ef; }
#journeyTree .journey-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .2rem .5rem; margin-bottom: .4rem; }
#journeyTree .journey-type { padding: 0; margin: 0; background: none; border-radius: 0; font-size: .6rem; line-height: 1.2; letter-spacing: .05em; text-transform: uppercase; color: var(--text-secondary); }
#journeyTree .journey-focus { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: .65rem; line-height: 1.3; letter-spacing: .02em; color: var(--accent-hover); background: rgba(201,168,76,.1); border: 1px solid rgba(201,168,76,.25); font-family: var(--font-body); }
#journeyTree .journey-date { position: static; padding: 0; margin: 0; border: 0; border-radius: 0; transform: none; background: none; color: #c3c3d0; font-size: .75rem; line-height: 1.3; letter-spacing: 0; text-transform: none; white-space: normal; box-shadow: none; font-variant-numeric: tabular-nums; }
#journeyTree .journey-title { font-size: 1.1rem; line-height: 1.1; margin-bottom: .3rem; }
#journeyTree .journey-org { font-size: .8125rem; line-height: 1.3; margin: 0; color: var(--text-secondary); }
#journeyTree .journey-item:hover .journey-node, #journeyTree .journey-item:focus-within .journey-node { transform: rotate(45deg) scale(1.4); background: var(--accent-hover); border-color: #fff; box-shadow: 0 0 16px rgba(235,198,98,.75); }
#journeyTree .education:hover .journey-node, #journeyTree .education:focus-within .journey-node { background: #85b4ff; border-color: #fff; box-shadow: 0 0 16px rgba(133,180,255,.8); }
@media (min-width: 1025px) and (max-width: 1500px), (min-width: 1025px) and (max-height: 800px) {
  #journeyTree { gap: .375rem; height: min(520px, calc(100dvh - 185px)); }
  #journeyTree .journey-card { padding: .4rem .6rem; }
  #journeyTree .journey-meta { flex-direction: row; align-items: center; gap: .15rem .35rem; margin-bottom: .3rem; }
  #journeyTree .journey-title { font-size: 1rem; }
  #journeyTree .journey-org { font-size: .75rem; }
  #journeyTree .journey-date { font-size: .6875rem; }
}
@media (max-width: 1024px) {
  #journeyTree { display: block; height: auto; }
  #journeyTree .journey-item { min-height: 110px; margin: .8rem 0; }
  #journeyTree .journey-card { padding: .85rem; }
}
@media (max-width: 900px) {
  #journeyTree .journey-item { grid-template-columns: 24px minmax(0, 1fr); gap: 1rem; }
  #journeyTree .journey-node { grid-column: 1; }
  #journeyTree .education .journey-card, #journeyTree .experience .journey-card { grid-column: 2; }
}

@media (min-width: 1025px) {
  #about .about-quote { font-size: clamp(1.6rem, 2.2vw, 2.6rem); line-height: 1.12; max-width: none; }
}

/* Bound the original three-column composition and leave room for side navigation. */
@media (min-width: 1761px) {
  #about .section-inner { max-width: 1800px; padding-left: 3rem; padding-right: 8rem; }
  #about .about-stage { grid-template-columns: minmax(250px,.7fr) minmax(350px,1.05fr) minmax(580px,1.45fr); gap: clamp(24px,2vw,40px); }
  #about .about-journey { transform: none; width: 100%; }
  #about .about-photo { max-width: 100%; }
  #about .about-quote { font-size: 2.2rem; text-wrap: balance; }
}

/* Branches make the connection between each card and the central timeline visible. */
@media (min-width: 901px) {
  #journeyTree .journey-card::before { content: ''; position: absolute; top: 50%; width: 21px; height: 1.5px; pointer-events: none; transition: background .2s, box-shadow .2s; }
  #journeyTree .education .journey-card::before { right: -21px; left: auto; background: linear-gradient(90deg, #747b90, #c9a84c); }
  #journeyTree .experience .journey-card::before { left: -21px; right: auto; background: linear-gradient(90deg, #c9a84c, #9b884c); }
  #journeyTree .journey-item:hover .journey-card::before, #journeyTree .journey-item:focus-within .journey-card::before { background: var(--accent-hover); box-shadow: 0 0 8px rgba(235,198,98,.5); }
}
@media (min-width: 1761px) and (min-height: 950px) {
  #journeyTree { height: min(650px, 62dvh); }
  #journeyTree .journey-card { padding: .7rem .85rem; }
}
@media (min-width: 2200px) {
  #about .section-inner { max-width: 2200px; width: 94%; }
  #journeyTree .journey-title { font-size: 1.25rem; }
  #journeyTree .journey-org { font-size: .9375rem; }
  #about .about-text { font-size: 1.15rem; }
}
@media (min-width: 901px) {
  #journeyTree .journey-card { overflow: visible; }
  #journeyTree .journey-card::before { opacity: 1; inset: auto; top: 50%; border-radius: 0; }
}
@media (min-width: 1025px) and (max-width: 1100px) {
  #journeyTree .journey-card { padding: .3rem .4rem; }
  #journeyTree .journey-title { font-size: .875rem; }
  #journeyTree .journey-org { font-size: .6875rem; }
  #journeyTree .journey-type { font-size: .5rem; }
  #journeyTree .journey-date { font-size: .625rem; }
}
