@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/dm-sans-latin.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-latin.woff2') format('woff2'); }

:root {
  --paper: #f7f8f5;
  --surface: #fff;
  --text: #24332e;
  --muted: #63736c;
  --line: #cfd7d1;
  --accent: #327258;
  --tint: #e6f0e9;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--text); font: 15px var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
button:disabled { opacity: .35; cursor: default; }
.skip { position: fixed; top: -60px; left: 10px; z-index: 50; padding: 15px; background: var(--surface); }
.skip:focus { top: 8px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 32px 4%; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand h1 { font-size: 22px; font-weight: 600; letter-spacing: -.6px; margin: 0; }
.brand-mark { font-size: 39px; letter-spacing: -5px; font-weight: 700; line-height: 1; }
.brand-mark span { color: var(--accent); }
.brand p { font-size: 12px; color: var(--muted); margin: 5px 0 0; line-height: 1.5; }
.site-header nav { display: flex; align-items: center; gap: 30px; font-size: 12px; }
.contact { min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--line); padding: 12px 18px; border-radius: 7px; }
.contact span { margin-left: 25px; }
main { padding: 0 4% 40px; }
.diagram { min-width: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); box-shadow: 0 12px 40px #25372e04; }
.viewport { background-image: radial-gradient(var(--line) .7px, transparent .7px); background-size: 18px 18px; }
.map { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; padding: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: 'about . experience' '. core .' 'deforestation jupiterlabs education' '. hearmeout .'; gap: 48px 44px; align-items: stretch; }
.connections { position: absolute; inset: 0 auto auto 0; width: 100%; height: 100%; overflow: visible; z-index: 2; pointer-events: none; }
.connections path { stroke: #a8bfb1; stroke-width: 1.2; fill: none; stroke-linejoin: round; }
.connections path.selected, .connections path.visited { stroke: var(--accent); }
.connections path.selected { stroke-width: 2.5; }
.connections .port { fill: var(--surface); stroke: #94b29e; stroke-width: 1.2; }
.connections .port.selected, .connections .port.visited { fill: var(--accent); stroke: var(--accent); }
.connections path.flow { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: .001 .999; stroke-dashoffset: 0; }
.node { position: relative; width: 100%; min-width: 0; min-height: 130px; text-align: left; border: 1px solid var(--line); border-radius: 9px; padding: 17px 19px; background: var(--surface); box-shadow: 0 4px 10px #1c3d2a05; transition: border-color .15s, box-shadow .15s; }
.node:hover, .node.selected { border-color: var(--accent); box-shadow: 0 8px 25px #25483112; }
.node-heading { display: flex; align-items: center; gap: 12px; }
.node-heading strong { flex: 1; }
.node-icon { font: 19px var(--mono); color: var(--accent); line-height: 1; }
.node-arrow { margin-left: auto; color: var(--muted); font-size: 15px; }
.node strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.node-description { display: block; font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.6; }
.about { grid-area: about; }
.experience { grid-area: experience; }
.deforestation { grid-area: deforestation; }
.jupiterlabs { grid-area: jupiterlabs; border-color: #9fbea9; }
.education { grid-area: education; }
.hearmeout { grid-area: hearmeout; background: var(--tint); border-color: #9fbea9; }
.core { grid-area: core; min-height: 94px; display: flex; align-items: center; gap: 17px; background: var(--tint); border: 1px solid #9fbea9; padding: 18px; }
.core strong { font-size: 23px; margin: 0 0 4px; }
.core-symbol { font-size: 43px; font-weight: 700; letter-spacing: -6px; padding-right: 6px; }
.core-symbol span { color: var(--accent); }
.core-caption { display: block; font: 11px var(--mono); color: var(--muted); }
dialog { inset: 0 0 0 auto; margin: 0; width: min(450px, 100%); max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-left: 1px solid var(--line); padding: 30px 34px; background: var(--surface); color: var(--text); box-shadow: -20px 0 70px #001a1820; }
dialog::backdrop { background: #0b211a45; backdrop-filter: blur(2px); }
dialog[open], dialog[open]::backdrop { animation: detail-fade 100ms ease-out; }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.detail-heading button { background: transparent; border: 1px solid var(--line); border-radius: 50%; height: 44px; width: 44px; flex-shrink: 0; }
dialog h2 { font-size: 30px; letter-spacing: -1px; font-weight: 500; line-height: 1.2; margin: 3px 0 0; }
dialog p { font-size: 13px; line-height: 1.8; color: var(--muted); }
dialog .detail-summary { font-size: 17px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 26px; }
.tags span { font: 10px var(--mono); padding: 7px 10px; background: var(--tint); border-radius: 4px; color: var(--accent); }
dialog h3 { font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); padding-top: 25px; }
.detail-link a { display: block; border: 1px solid var(--accent); background: var(--accent); color: var(--surface); padding: 15px 18px; margin-top: 30px; border-radius: 6px; font-size: 12px; }
.detail-flow { padding: 0; list-style: none; display: flex; gap: 7px; flex-wrap: wrap; margin: 25px 0; }
.detail-flow li { padding: 10px; border: 1px solid var(--line); font: 9px var(--mono); border-radius: 4px; }
.detail-flow li + li:before { content: '→'; margin-right: 8px; color: var(--accent); }

@media (min-width: 1450px) {
  main { max-width: 1460px; margin: auto; }
  .site-header { max-width: 1585px; margin: auto; }
}

@media (max-width: 900px) {
  .map { display: flex; flex-direction: column; gap: 32px; padding: 24px 20px 24px 48px; }
  .node { min-height: 120px; }
  .core { min-height: 94px; }
}

@media (max-width: 700px) {
  .site-header { padding: 22px 16px; gap: 12px; }
  .brand { gap: 12px; }
  .brand h1 { font-size: 20px; }
  .brand p { font-size: 10px; max-width: 195px; }
  .brand-mark { font-size: 34px; }
  .site-header nav { gap: 12px; font-size: 10px; }
  .site-header nav > a:first-child { display: none; }
  .contact { padding: 10px 12px; }
  .contact span { margin-left: 10px; }
  main { padding: 0 12px 24px; }
  .viewport { background-size: 17px 17px; }
  dialog { padding: 25px 24px; }
  dialog h2 { font-size: 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: detail-open 280ms cubic-bezier(.16, 1, .3, 1); }
  dialog[open]::backdrop { animation-duration: 240ms; }
  .connections .flow { animation: signal-flow 6s linear infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .node { transition: none; }
  .connections path.flow { stroke-dashoffset: -.5; }
}

.motion-paused .connections .flow { animation-play-state: paused; }

@keyframes detail-fade { from { opacity: 0; } }
@keyframes detail-open { from { opacity: 0; transform: translateX(28px); } }

@keyframes signal-flow {
  to { stroke-dashoffset: -1; }
}

.position ul { padding-left: 18px; font-size: 13px; line-height: 1.75; color: var(--muted); }
.position li { margin: 8px 0; }
.position .position-dates { font: 10px/1.7 var(--mono); }


/* Keep native links visually consistent with the architecture nodes. */
a.node { display: block; font: inherit; }
a.node.core { display: flex; }
.profile-page { max-width: 760px; margin: 0 auto; padding: 32px 24px 72px; }
.profile-page > a { display: inline-block; padding: 12px 0; color: var(--accent); }
.profile-page article { margin-top: 28px; padding: clamp(24px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.profile-page h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 500; letter-spacing: -1px; margin: 0 0 20px; }
.profile-page h2 { margin-top: 32px; font-size: 20px; font-weight: 600; }
.profile-page p, .profile-page li { line-height: 1.8; }
.profile-page .detail-summary { font-size: 20px; line-height: 1.5; }
.profile-page .position { margin: 0; padding: 0; border: 0; }
.profile-page .position ul { font-size: 15px; }
.profile-page .detail-link a { display: inline-block; }
.profile-page nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; }
.profile-page nav a { padding: 12px 0; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
