@font-face {
  font-family: 'Pixelify Sans';
  src: url('assets/fonts/pixelify-sans.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}
@font-face{font-family:Inter;src:url('assets/fonts/inter.woff2') format('woff2');font-weight:100 900;font-display:swap}@font-face{font-family:'Space Grotesk';src:url('assets/fonts/space-grotesk.ttf') format('truetype');font-weight:300 700;font-display:swap}@font-face{font-family:'JetBrains Mono';src:url('assets/fonts/jetbrains-mono.woff2') format('woff2');font-display:swap}
:root{--base:#1e1e2e;--mantle:#181825;--crust:#11111b;--surface:#313244;--surface1:#45475a;--muted:#a6adc8;--text:#cdd6f4;--peach:#fab387;--blue:#89b4fa;--green:#a6e3a1;--red:#f38ba8;--lavender:#b4befe;--line:#313244;color-scheme:dark;font-family:Inter,system-ui,sans-serif;color:var(--text);background:var(--crust)}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit;background:none;border:0}a{color:var(--blue)}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--peach);outline-offset:4px}button:hover,a:hover{color:var(--peach)}button:disabled{cursor:default;color:var(--muted)}[hidden]{display:none!important}.shell{max-width:1760px;margin:auto;min-height:100dvh;display:grid;grid-template-columns:minmax(330px,34%) 1fr;border:1px solid var(--surface);background:var(--base)}.profile{border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100dvh;min-height:760px}.profile-top,.workspace-top{height:81px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;gap:20px}.wordmark{font-family:'JetBrains Mono',monospace;font-weight:500;text-decoration:none;color:var(--peach);font-size:18px}.cursor-mark{color:var(--muted);margin-left:3px}.profile-content{padding:40px 38px;max-width:580px}.hello-mark{font-size:38px;color:var(--peach);font-family:'JetBrains Mono',monospace;margin:0 0 38px;letter-spacing:-3px}.eyebrow{font-family:'JetBrains Mono',monospace;font-size:11px!important;letter-spacing:1.7px;color:var(--muted);font-weight:400;margin:0 0 15px!important}h1,h2,h3,p{margin-top:0}h1,h2,h3{font-family:'Space Grotesk',sans-serif;font-weight:500}h1{font-size:48px;letter-spacing:-2.4px;line-height:1.15;margin-bottom:24px;color:var(--peach)}h1 span{color:var(--peach)}.profile p{font-size:15px;line-height:1.8;margin-bottom:20px}.profile .intro{font-size:18px;line-height:1.65}.intro strong{color:var(--text);font-weight:600}.profile-rule{width:42px;height:1px;background:var(--surface1);margin:28px 0}.profile h2{font-size:21px;margin-bottom:12px}.contact{margin-top:40px}.contact h2{font-size:28px;color:var(--peach)}.underlined{padding:0;border-bottom:1px solid var(--surface1);font-size:14px;padding-bottom:4px}.profile-footer{border-top:1px solid var(--line);margin-top:auto;padding:20px 34px;display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}main{min-width:0;background:var(--base)}.workspace-top{padding:0 36px}.workspace-label{font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:11px}.workspace-content{padding:43px 36px 24px;max-width:1150px;margin:auto}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-heading h2{font-size:38px;letter-spacing:-1.4px;margin-bottom:10px}.section-heading h2 span{color:var(--peach)}.section-description{font-size:14px;color:var(--muted);line-height:1.7;margin-bottom:30px}.search{display:flex;align-items:center;border:1px solid var(--surface1);background:var(--mantle);border-radius:5px;padding:0 14px;gap:10px}.search>span{font-size:26px;color:var(--muted)}.search input{background:none;border:0;color:var(--text);width:100%;height:44px;min-width:0;outline:none!important;font-size:14px}.search:focus-within{border-color:var(--peach)}.search input::placeholder{color:var(--muted)}kbd{border:1px solid var(--surface1);border-radius:3px;font-size:11px;color:var(--muted);padding:2px 5px}.catalog-meta{display:flex;justify-content:space-between;color:var(--muted);font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.6px;margin:26px 0 15px}.catalog-meta span:first-child{font-size:12px;letter-spacing:0}.catalog{display:grid;grid-template-columns:1fr 1fr;gap:19px}.project-card{border:1px solid var(--surface);border-radius:7px;overflow:hidden;min-width:0;background:var(--base);text-align:left;padding:0;display:flex;flex-direction:column;transition:border-color .15s}.project-card:hover{border-color:var(--surface1);color:var(--text)}.project-card:hover h3{color:var(--peach)}.card-copy{padding:19px 19px 17px;flex:1;display:flex;flex-direction:column}.card-category{font-family:'JetBrains Mono',monospace;color:var(--muted);font-size:10px;margin-bottom:10px;display:flex;justify-content:space-between}.card-copy h3{font-size:20px;letter-spacing:-.5px;margin:0 0 8px}.card-copy p{font-size:13px;color:var(--muted);line-height:1.7;margin:0 0 20px}.tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto}.tags span{font:10px 'JetBrains Mono',monospace;color:var(--muted);background:var(--mantle);padding:5px 7px;border:1px solid var(--surface);border-radius:3px}.card-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:18px;font-size:12px}.card-bottom span:first-child{color:var(--blue)}.card-bottom span:last-child{color:var(--muted);font-size:10px}.empty{grid-column:1/-1;padding:50px 20px;text-align:center;border:1px dashed var(--surface1);border-radius:6px}.empty p{color:var(--muted);font-size:14px}.primary{background:var(--peach);color:var(--crust);padding:10px 17px;border-radius:5px;font-size:13px;font-weight:600}.primary:hover{background:#f5c2e7;color:var(--crust)}.secondary{border:1px solid var(--surface1);padding:9px 16px;border-radius:5px;font-size:13px}.terminal{border:1px solid var(--surface1);border-radius:7px;overflow:hidden;background:var(--mantle)}.terminal-top{padding:13px 16px;background:var(--base);border-bottom:1px solid var(--surface);display:flex;align-items:center;justify-content:space-between;gap:10px;font:10px 'JetBrains Mono',monospace;color:var(--muted)}.terminal-top>span:first-child{display:flex;gap:6px}.terminal-top i{width:7px;height:7px;border-radius:50%;background:var(--surface1)}.terminal-top i:first-child{background:var(--peach)}.terminal-body{padding:24px;min-height:315px;max-height:490px;overflow:auto;font:12px/1.9 'JetBrains Mono',monospace;overflow-wrap:anywhere}.terminal-welcome{color:var(--green);font-size:14px}.terminal-muted{color:var(--muted);font-size:11px}.terminal-muted b{color:var(--text);font-weight:400}#terminal-prompt{display:flex;gap:9px;align-items:baseline}#prompt{color:var(--peach);white-space:nowrap}#command{background:none;border:0;outline:none;color:var(--text);width:100%;min-width:30px;font:inherit;padding:0}#command:focus-visible{outline:none}.terminal-entry{white-space:pre-wrap;margin:13px 0;color:var(--text)}.terminal-entry .input-line{color:var(--peach);display:block}.terminal-entry .error{color:var(--red)}.terminal-entry .output{display:block}.terminal-entry button{font:inherit;color:var(--blue);padding:0;text-align:left}.terminal-entry button:hover{text-decoration:underline}.terminal-bottom{border-top:1px solid var(--surface);padding:9px 15px;display:flex;justify-content:space-between;font:10px 'JetBrains Mono',monospace;color:var(--muted)}.terminal-bottom button{font:inherit}dialog{padding:0;border:1px solid var(--surface1);background:var(--base);color:var(--text);border-radius:9px;width:min(800px,calc(100% - 32px));max-height:90dvh;overflow:auto;box-shadow:0 20px 100px #0008}dialog::backdrop{background:#11111bba;backdrop-filter:blur(4px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;padding:15px 24px;border-bottom:1px solid var(--surface);font-size:11px;color:var(--muted);gap:15px}.dialog-top button{font-size:19px;padding:4px 8px}.mono{font-family:'JetBrains Mono',monospace}#project-detail{padding:28px}#project-detail h2{font-size:30px;letter-spacing:-1px;margin:8px 0 13px}#project-detail p{font-size:14px;line-height:1.8;color:var(--muted)}.skip{position:fixed;top:-80px;left:20px;z-index:9;padding:12px;background:var(--peach);color:var(--crust)}.skip:focus{top:15px}
@media(min-width:1500px){.profile-content{padding:52px 48px}.profile p{font-size:16px}.profile .intro{font-size:20px}.workspace-content{padding:50px}.card-copy{padding:23px}.card-copy p{font-size:14px}.hello-mark{font-size:45px;margin-bottom:45px}}
@media(max-width:1150px){.shell{grid-template-columns:310px 1fr}.profile-content{padding:32px 25px}.profile-top,.profile-footer{padding-left:25px;padding-right:25px}.workspace-top{padding:0 24px}.workspace-label{font-size:10px}.workspace-content{padding:32px 24px}.card-copy{padding:16px}.card-copy h3{font-size:18px}.card-copy p{font-size:12px}.contact{margin-top:28px}.profile p{font-size:14px}.profile .intro{font-size:17px}h1{font-size:42px}.hello-mark{font-size:32px}}
@media(max-width:850px){.shell{display:block}.profile{position:static;height:auto;min-height:0;border-right:0;border-bottom:1px solid var(--surface1)}.profile-top,.workspace-top{height:68px;padding:0 24px}.profile-content{padding:32px 24px;max-width:none;display:grid;grid-template-columns:1fr 1fr;column-gap:32px}.hello-mark{grid-column:1/-1;margin-bottom:25px}.profile-content>.eyebrow,.profile-content>h1,.profile-content>.intro{grid-column:1}.profile-content>p:not(.intro):not(.eyebrow){grid-column:2}.profile-content>p:nth-of-type(3){grid-row:2/4}.profile-content>p:nth-of-type(4){grid-row:4/5}.profile-rule,.profile-content>h2{display:none}.contact{grid-column:1/-1;border-top:1px solid var(--surface);padding-top:22px;margin-top:8px;display:block}.contact h2{font-size:22px;margin:0}.profile-footer{display:none}.workspace-top{position:sticky;top:0;background:var(--base);z-index:2}.workspace-label{font-size:12px}.workspace-content{padding:32px 24px}.card-copy p{font-size:14px}.card-copy h3{font-size:21px}}
@media(max-width:540px){.profile-content{display:block;padding:28px 24px}.hello-mark{font-size:30px;margin-bottom:24px}.profile-content>.eyebrow{font-size:10px!important}h1{font-size:40px;margin-bottom:18px}.profile p{font-size:14px}.profile .intro{font-size:17px}.profile-content>p:nth-of-type(4){display:none}.contact{display:block;margin-top:25px;padding-top:20px}.contact h2{margin-bottom:10px}.workspace-top{padding:0 18px;gap:10px}.workspace-label{font-size:10px;gap:8px}.workspace-content{padding:30px 18px 22px}.section-heading h2{font-size:32px}.eyebrow{font-size:9px!important;letter-spacing:1.2px}.section-description{font-size:13px}.catalog{grid-template-columns:1fr;gap:18px}.card-copy{padding:20px}.card-copy p{font-size:14px}.catalog-meta>span:last-child{font-size:8px}.search input{font-size:12px}.terminal-body{padding:17px;font-size:11px}.terminal-top{padding:12px 10px;font-size:8px}.terminal-bottom{font-size:8px}#project-detail{padding:20px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Lectura principal y controles: tamaños legibles también en pantallas compactas. */
.profile p{font-size:16px}.section-description{font-size:16px}.card-copy p{font-size:14px}.card-category{font-size:12px}.card-bottom{font-size:14px}.filters button{font-size:14px}.search input{font-size:14px}.tags span{font-size:12px}.terminal-body{font-size:14px}.terminal-muted{font-size:12px}
@media(max-width:1150px) and (min-width:851px){.profile-content{padding-top:28px;padding-bottom:28px}.hello-mark{margin-bottom:26px}.profile p{font-size:15px}.contact{margin-top:24px}.card-category{font-size:10px}.tags span{font-size:11px}}
@media(max-width:540px){.profile p{font-size:16px}.section-description{font-size:14px}.terminal-body{font-size:12px}#prompt{white-space:normal}.section-heading{align-items:flex-end}}

.terminal:focus-within {
  border-color: var(--muted);
}

.terminal-top {
  justify-content: flex-start;
}

.profile-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 24px;
}
.profile-nav a, .profile-return {
  color: #fff8e7;
  font-size: .875rem;
  text-underline-offset: 4px;
}
.profile-nav a[aria-current="page"] { font-weight: 600; }
.profile-nav a:hover, .profile-return:hover { color: var(--peach); }
.return-control {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 32px;
  font: 600 1rem 'JetBrains Mono', monospace;
  text-decoration: none;
}

.profile-page-intro, .profile-empty, .record-meta {
  color: var(--muted);
}

.profile-page h2 {
  font-size: clamp(2rem, 4vw, 3.125rem);
  letter-spacing: -.04em;
  margin: 16px 0 8px;
  scroll-margin-top: 84px;
}
.profile-page h2 span { color: var(--peach); }
.profile-page-intro { margin-bottom: 26px; }
.profile-page-intro p { max-width: 70ch; margin: 0 0 12px; line-height: 1.65; }
.profile-page-intro p:last-child { margin-bottom: 0; }
.credential-group { margin-top: 18px; }
.credential-group + .credential-group { margin-top: 32px; }
.credential-group > h3 { font-size: 1.25rem; margin: 0 0 14px; }
.credential-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.credential-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 7px;
}
.credential-preview { margin: 0; }
.credential-preview a { display: block; cursor: zoom-in; }
.credential-preview a:focus-visible { outline-offset: -3px; }
.credential-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 11 / 8.5;
  object-fit: contain;
  background: var(--crust);
}
.credential-copy { flex: 1; padding: 16px; overflow-wrap: anywhere; }
.credential-copy :is(h3, h4) { font-size: 1rem; line-height: 1.45; margin: 0 0 8px; }
.credential-copy p { margin: 0; line-height: 1.5; }
.credential-copy p + p { margin-top: 12px; }
.credential-copy .record-meta { font-size: .82rem; }

@media (min-width: 851px) {
  .profile { height: auto; min-height: 100dvh; align-self: start; }
}
@media (max-width: 850px) {
  .profile-nav { grid-column: 1 / -1; margin: 0 0 14px; }
}

.command-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 30px;
}
.command-ghost {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: pre;
  color: var(--muted);
  opacity: .78;
}
#command-ghost-prefix { visibility: hidden; }

#terminal-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--surface);
  background: var(--base);
}
#terminal-tabs button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  color: var(--muted);
  font: .8125rem 'JetBrains Mono', monospace;
}
#terminal-tabs button[aria-selected="true"] {
  border-color: var(--surface1);
  border-bottom-color: var(--peach);
  color: var(--text);
  background: var(--mantle);
}
#terminal-tabs button:hover { color: var(--peach); }
#terminal-tabs button:focus-visible { outline-offset: -3px; }
.terminal-opening { color: var(--green); }
.opening-dots span { display: inline-block; animation: terminal-dot 420ms ease-out backwards; }
.opening-dots span:nth-child(2) { animation-delay: 110ms; }
.opening-dots span:nth-child(3) { animation-delay: 220ms; }
@keyframes terminal-dot { from { opacity: 0; } to { opacity: 1; } }
.terminal-document {
  padding: 16px 24px 24px;
  animation: terminal-document-in 180ms ease-out;
}
@keyframes terminal-document-in { from { opacity: .5; } to { opacity: 1; } }
.terminal-close {
  display: block;
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid var(--surface1);
  border-radius: 4px;
  font-size: .8125rem;
}
@media (max-width: 540px) {
  .terminal-document { padding: 14px; }
  #terminal-tabs button { padding-inline: 9px; }
}
.repository-actions { margin-top: 20px; }
.repository-actions a { text-underline-offset: 4px; }
.project-card { overflow-wrap: anywhere; }

.repository-case .repository-actions {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.repository-actions .case-demo {
  border-radius: 4px;
  background: var(--peach);
  color: var(--crust);
  text-decoration: none;
  padding: 7px 12px;
  font-weight: 600;
}
.repository-actions .case-demo:hover { background: var(--text); }
.case-overview, .case-gallery, .case-flow {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}
.case-overview section, .case-flow li {
  padding: 14px;
  background: var(--base);
  border: 1px solid var(--surface1);
  border-radius: 5px;
}
.case-overview section p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.case-section { margin-top: 24px; }
.case-section h3, .case-overview h3 { margin-bottom: 9px; }
.case-gallery figure { margin: 0; min-width: 0; }
.case-gallery figure:only-child { grid-column: 1 / -1; }
.case-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--surface1);
}
.case-gallery figcaption { margin-top: 6px; color: var(--muted); font-size: .875rem; }
.case-flow {
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-flow li { font-size: .875rem; line-height: 1.55; }
.case-docs { margin: 0; padding-left: 18px; line-height: 1.9; }
@media (max-width: 540px) {
  .case-overview, .case-gallery, .case-flow { grid-template-columns: 1fr; }
}

.repository-case .case-context {
  margin: 0 0 7px;
  color: var(--peach);
  font: .8125rem/1.5 'JetBrains Mono', monospace;
}
.repository-case .case-context + h2 { margin-top: 0; }
.case-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  margin: 0;
}
.case-highlights > div { padding: 12px 14px; border-left: 2px solid var(--surface1); }
.case-highlights dt { font-weight: 600; margin-bottom: 7px; }
.case-highlights dd { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.case-flow li { position: relative; }
.case-flow li + li::before {
  position: absolute;
  content: '→' / '';
  color: var(--peach);
  inset-inline-start: -14px;
  inset-block-start: 50%;
  transform: translateY(-50%);
}
.case-report {
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--surface1);
  border-radius: 5px;
}
.case-report summary { cursor: pointer; color: var(--blue); }
.case-report p { margin: 10px 0; }
.case-report object { display: block; width: 100%; height: clamp(260px, 60dvh, 620px); margin-bottom: 10px; }
@media (max-width: 540px) {
  .case-flow li + li::before {
    content: '↓' / '';
    inset-inline-start: 12px;
    inset-block-start: -15px;
    transform: none;
  }
}

.project-cover {
  display: block;
  aspect-ratio: 16 / 8;
  width: 100%;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--surface1);
}
.case-gallery[data-gallery-size="3"] figure:first-child {
  grid-column: 1 / -1;
}
.case-gallery a { display: block; cursor: zoom-in; }
#media-dialog {
  width: min(1100px, calc(100% - 26px));
  max-height: calc(100dvh - 26px);
}
#media-image {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 100px);
  object-fit: contain;
  background: var(--crust);
}


#portfolio-pet { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#pet-sprite, #pet-bubble { pointer-events: auto; }
#pet-sprite {
  position: absolute;
  inset: auto 18px 10px auto;
  width: 228px;
  height: 96px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
#pet-sprite canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.pixel-cloud {
  --cloud-border: #8791b0;
  --cloud-top: #fff8e7;
  --cloud-bottom: #f2e7d3;
  position: absolute;
  isolation: isolate;
  max-height: calc(100dvh - 24px);
  padding: 14px 17px 20px;
  color: #25263a;
  font: 400 1rem/1.4 'Pixelify Sans', monospace;
  filter: drop-shadow(0 5px 0 #10132266);
}
#pet-bubble {
  --cloud-tail-x: calc(100% - 114px);
  inset: auto 18px 104px auto;
  width: min(352px, calc(100vw - 36px));
}
#profile-panel .profile-top { position: relative; z-index: 1; }
#palo-bubble {
  --cloud-tail-x: 62%;
  inset: calc(100% - 5px) 14px auto;
  max-width: 304px;
}
#palo-bubble::before, #palo-bubble::after { transform: scaleY(-1); }
#palo-bubble::after { inset-block: 9px 3px; }
.pixel-cloud::before, .pixel-cloud::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.pixel-cloud::before {
  inset: 0;
  background: var(--cloud-border);
  clip-path: polygon(0 18px, 6px 18px, 6px 12px, 12px 12px, 12px 6px, 22px 6px, 22px 0, 29% 0, 29% 5px, 38% 5px, 38% 0, 65% 0, 65% 5px, 73% 5px, 73% 0, calc(100% - 22px) 0, calc(100% - 22px) 6px, calc(100% - 12px) 6px, calc(100% - 12px) 12px, calc(100% - 6px) 12px, calc(100% - 6px) 18px, 100% 18px, 100% calc(100% - 18px), calc(100% - 6px) calc(100% - 18px), calc(100% - 6px) calc(100% - 12px), calc(100% - 12px) calc(100% - 12px), calc(100% - 12px) calc(100% - 6px), calc(var(--cloud-tail-x) + 13px) calc(100% - 6px), calc(var(--cloud-tail-x) + 13px) 100%, calc(var(--cloud-tail-x) - 6px) 100%, calc(var(--cloud-tail-x) - 6px) calc(100% - 6px), 12px calc(100% - 6px), 12px calc(100% - 12px), 6px calc(100% - 12px), 6px calc(100% - 18px), 0 calc(100% - 18px));
}
.pixel-cloud::after {
  inset: 3px 3px 9px;
  background: linear-gradient(var(--cloud-top) 0 92%, var(--cloud-bottom) 92%);
  clip-path: polygon(0 17px, 6px 17px, 6px 11px, 12px 11px, 12px 5px, 22px 5px, 22px 0, 28% 0, 28% 5px, 39% 5px, 39% 0, 64% 0, 64% 5px, 74% 5px, 74% 0, calc(100% - 22px) 0, calc(100% - 22px) 5px, calc(100% - 12px) 5px, calc(100% - 12px) 11px, calc(100% - 6px) 11px, calc(100% - 6px) 17px, 100% 17px, 100% calc(100% - 10px), calc(100% - 5px) calc(100% - 10px), calc(100% - 5px) calc(100% - 5px), calc(100% - 10px) calc(100% - 5px), calc(100% - 10px) 100%, 10px 100%, 10px calc(100% - 5px), 5px calc(100% - 5px), 5px calc(100% - 10px), 0 calc(100% - 10px));
}
.pixel-cloud header, .pet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pixel-cloud header strong {
  color: #8d422f;
  font-weight: 600;
}
.pixel-cloud .return-control {
  color: #353954;
  font: inherit;
  padding: 4px;
}
.pixel-cloud .return-control:hover { color: #8d422f; }
.pixel-cloud .pet-fact h2 {
  font: 600 1.25rem/1.2 'Pixelify Sans', monospace;
  margin: 5px 0 4px;
}
.pixel-cloud .pet-fact p { font: inherit; margin: 5px 0 12px; }
.case-trivia {
  margin-top: 20px;
  padding: 10px 14px;
  border-left: 2px solid var(--peach);
  background: var(--mantle);
}
.case-trivia summary { cursor: pointer; color: var(--peach); }
.case-trivia p { margin: 8px 0 0; }

.profile-brand { display: flex; width: 100%; justify-content: center; align-items: center; gap: 14px; }
.profile-brand .wordmark { white-space: nowrap; }
#palo-sleep {
  --palo-width: clamp(104px, 36vw, 136px);
  position: relative;
  display: block;
  flex: none;
  width: var(--palo-width);
  height: calc(var(--palo-width) / 2 + 6px);
  padding: 0;
}
#palo-sleep canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.palo-inhale { opacity: 0; }
.palo-zz {
  position: absolute;
  top: 0;
  left: 18%;
  width: 24px;
  height: 16px;
  pointer-events: none;
}
.sleep-letters i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--lavender);
  clip-path: polygon(0 0,100% 0,100% 20%,80% 20%,80% 40%,60% 40%,60% 60%,40% 60%,40% 80%,100% 80%,100% 100%,0 100%,0 80%,20% 80%,20% 60%,40% 60%,40% 40%,60% 40%,60% 20%,0 20%);
}
.palo-zz i:first-child { bottom: 0; left: 0; }
.palo-zz i:last-child { bottom: 5px; left: 9px; transform: scale(1.4); }
.ticon-zz {
  position: absolute;
  top: 13%;
  left: 29%;
  width: 29px;
  height: 17px;
  pointer-events: none;
}
.ticon-zz i:nth-child(1) { bottom: 0; left: 0; }
.ticon-zz i:nth-child(2) { bottom: 6px; left: 9px; transform: scale(1.25); }
.ticon-zz i:nth-child(3) { bottom: 12px; left: 19px; transform: scale(1.5); }
@media (prefers-reduced-motion: no-preference) {
  .palo-inhale { animation: palo-breath 3.6s steps(1, end) infinite; }
  .sleep-letters i { animation: palo-drowse 3.6s steps(1, end) infinite backwards; }
  .palo-zz i:last-child, .ticon-zz i:nth-child(2) { animation-delay: .6s; }
  .ticon-zz i:nth-child(3) { animation-delay: 1.2s; }
}
@keyframes palo-breath { 0%, 100% { opacity: 0; } 38% { opacity: 1; } 72% { opacity: 0; } }
@keyframes palo-drowse { 0%, 66%, 100% { opacity: 0; } 24% { opacity: 1; } }
@media (max-width: 360px) {
  .profile-top { gap: 9px; }
  .profile-brand { gap: 5px; }
  .profile-brand .wordmark { font-size: 16px; }
}


.shell {
  --profile-drawer-width: min(410px, calc(100vw - 22px));
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  border: 0;
}
#workspace { min-width: 0; }
.workspace-content {
  max-width: 1560px;
  padding: clamp(24px, 3.2vw, 48px) clamp(16px, 3vw, 46px) clamp(64px, 9dvh, 108px);
}
.catalog {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

#workspace[data-mode="cli"] .workspace-content {
  max-width: 1380px;
  padding-top: clamp(14px, 2.4vh, 26px);
}
.terminal-screen {
  position: relative;
  isolation: isolate;
  background: var(--mantle);
}
#terminal-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(84%, 56rem);
  height: auto;
  max-height: 86%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  opacity: .22;
  filter: contrast(1.35) saturate(.7);
  mix-blend-mode: screen;
  pointer-events: none;
}
.terminal-screen .terminal-body { position: relative; }
.terminal-body {
  height: clamp(188px, calc(100vh - 245px), 570px);
  height: clamp(188px, calc(100dvh - 245px), 570px);
  min-height: 0;
  max-height: none;
  overflow: auto;
  font-size: clamp(.8125rem, .78rem + .12vw, .95rem);
}
.terminal-muted { font-size: .8125rem; }
.terminal-document { overflow-wrap: anywhere; }
#terminal-prompt { flex-wrap: wrap; }
#prompt { white-space: normal; overflow-wrap: anywhere; }
.command-field { min-width: min(100%, 10ch); }

@media (min-width: 1081px) {
  .shell { --profile-drawer-width: clamp(304px, 23vw, 420px); }
  .shell[data-profile="open"] > #workspace { margin-inline-start: var(--profile-drawer-width); }
  #profile-panel .profile-content { padding-inline: clamp(24px, 3vw, 44px); }
}
.workspace-label { min-width: 0; }

#profile-drawer {
  --drawer-width: var(--profile-drawer-width);
  position: fixed;
  z-index: 8;
  inset: 0 auto 0 0;
  width: var(--drawer-width);
  pointer-events: none;
}
#profile-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--surface1);
  border-radius: 5px;
  background: var(--base);
  color: var(--text);
  pointer-events: auto;
}
#profile-toggle:hover { border-color: var(--peach); color: var(--peach); }
.profile-toggle-icon {
  width: 16px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: linear-gradient(to right, var(--surface1) 0 28%, currentColor 28% 36%, transparent 36%);
}
.shell[data-profile-modal] #profile-toggle {
  position: absolute;
  z-index: 2;
  inset: 93px 12px auto auto;
}
#profile-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--base);
  border-right: 1px solid var(--surface1);
  visibility: hidden;
  transform: translateX(-100%);
  pointer-events: none;
}
.shell[data-profile="open"] #profile-panel {
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  box-shadow: 16px 0 35px #11111b80;
}
#profile-panel .profile-top { flex: none; padding-inline: 18px; }
#profile-panel .profile-content { display: block; flex: none; }
#profile-panel .profile-nav { margin-top: 16px; }
#profile-panel .profile-footer { display: flex; align-items: center; gap: 12px; }
#profile-scrim {
  position: fixed;
  z-index: 7;
  inset: 0;
  background: #11111bbb;
}
html:has(.shell[data-profile-modal]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  #profile-panel { transition: transform 220ms ease, visibility 0s 220ms; }
  .shell[data-profile="open"] #profile-panel { transition: transform 220ms ease, visibility 0s; }
}
@media (max-width: 700px), (max-height: 750px) {
  #pet-sprite { width: 152px; height: 64px; }
  #pet-bubble { bottom: 72px; --cloud-tail-x: calc(100% - 76px); }
}
@media (max-width: 420px) {
  #pet-sprite { width: 114px; height: 48px; }
  #pet-bubble { bottom: 57px; --cloud-tail-x: calc(100% - 57px); }
}

html, #profile-panel, .terminal-body {
  scrollbar-color: var(--surface1) var(--mantle);
  scrollbar-width: thin;
}


/* The text scale follows the viewport while keeping the browser's base size. */
html { font-size: clamp(100%, calc(94% + .30vw), 118.75%); }

.section-heading h2 {
  font-size: clamp(2rem, calc(1.65rem + .85vw), 2.65rem);
  line-height: 1.13;
  letter-spacing: -.035em;
}
.section-description { font-size: 1rem; }
.eyebrow { font-size: .72rem !important; letter-spacing: .12em; }
.catalog-meta span:first-child { font-size: .78rem; }
.catalog { gap: clamp(15px, 1.35vw, 25px); }
.card-copy { padding: clamp(16px, 1.55vw, 23px); }
.card-copy h3 { font-size: 1.16rem; line-height: 1.3; letter-spacing: -.02em; }
.card-copy p { font-size: .95rem; line-height: 1.65; }
.card-copy .card-category { font-size: .74rem; line-height: 1.4; }
.tags span { font-size: .74rem; }
.card-bottom, .card-bottom span:last-child { font-size: .82rem; }
.search input { font-size: .95rem; min-height: 2.65rem; }
.search kbd { font-size: .72rem; }

.profile h1 { font-size: clamp(2.25rem, calc(1.8rem + .7vw), 2.65rem); line-height: 1.16; }
.profile h2 { font-size: 1.18rem; }
.profile p { font-size: .95rem; line-height: 1.68; }
.profile .intro { font-size: 1.06rem; }
.profile .contact h2 { font-size: 1.4rem; }
.profile-nav a { font-size: .88rem; }
.profile-footer { font-size: .79rem; }
.wordmark { font-size: 1rem; }

.workspace-label { font-size: .76rem; }

#profile-toggle { width: 39px; height: 39px; }
.terminal-body { font-size: .88rem; }
.terminal-top { font-size: .75rem; }
.terminal-muted { font-size: .81rem; }
.terminal-bottom { font-size: .71rem; flex-wrap: wrap; gap: 4px 12px; }
#terminal-tabs button { font-size: .8rem; }
#terminal-prompt { column-gap: .55rem; }

#project-dialog { width: min(920px, calc(100% - 28px)); }
#project-detail h2 { font-size: clamp(1.5rem, calc(1.35rem + .55vw), 2.15rem); }
#project-detail p { font-size: .95rem; line-height: 1.65; }
#project-detail .case-context { font-size: .75rem; }
.dialog-top { font-size: .78rem; }
.contact h3 { color: var(--muted); font: 500 .88rem Inter, system-ui, sans-serif; margin: 8px 0 6px; }
.contact-links { display: grid; gap: 2px; list-style: none; padding: 0; margin: 0; }
.contact-links a { display: inline-block; color: #fff8e7; font-size: .88rem; padding-block: 5px; text-underline-offset: 4px; }
.contact-links a:hover { color: var(--peach); }

@media (max-width: 540px) {
  .workspace-top { gap: 8px; }
  
  #profile-toggle { width: 35px; height: 36px; }
}

/* The emphasized glyph indicates that the panel is pinned. */
.shell[data-profile-mode="fixed"] #profile-toggle {
  border-color: var(--peach);
  background: var(--surface);
  color: var(--peach);
  box-shadow: 0 2px var(--crust), inset 0 0 0 1px #fab38745;
}
.shell[data-profile-mode="fixed"] .profile-toggle-icon {
  border-width: 2px;
  background: linear-gradient(to right, currentColor 0 38%, transparent 38%);
}

@media (max-width: 1080px) {
  .shell[data-profile-mode="fixed"] #profile-drawer {
    position: relative;
    inset: auto;
    width: 100%;
    pointer-events: auto;
  }
  .shell[data-profile-mode="fixed"] #profile-panel {
    position: relative;
    height: auto;
    overflow: visible;
    border-right: 0;
    box-shadow: none;
  }
}

.workspace-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr);
}
.mode-switch {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 7.5rem;
  min-height: 40px;
  padding: 5px 10px;
  border: 1px solid var(--surface1);
  border-radius: 7px;
  color: var(--text);
  background: var(--mantle);
  font-size: .875rem;
}
.mode-switch:hover { border-color: var(--peach); color: var(--text); }
.mode-switch-track {
  display: block;
  width: 35px;
  height: 19px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface1);
}
.mode-switch-track::after {
  content: '';
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--lavender);
}
.mode-switch[aria-checked="true"] .mode-switch-track { background: #5b433a; }
.mode-switch[aria-checked="true"] .mode-switch-track::after {
  transform: translateX(16px);
  background: var(--peach);
}
@media (prefers-reduced-motion: no-preference) {
  .mode-switch-track::after { transition: transform 150ms ease; }
}
#workspace-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px clamp(5px, 1.4vw, 18px);
  font: .82rem 'JetBrains Mono', monospace;
}
#workspace-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding-inline: 5px;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
}
#workspace-nav a:hover { color: var(--peach); }
#workspace-nav a[aria-current="page"] {
  color: var(--peach);
  background: var(--surface);
}

/* The path is editable in CLI. */
.workspace-label { position: relative; flex: 1 1 0; gap: 9px; max-width: 42ch; }
.route-field { position: relative; flex: 1; min-width: 0; }
#friendly-route { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#route-input {
  width: 100%;
  min-width: 0;
  display: block;
  padding: 8px 5px;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
}
#route-input:hover, #route-input:focus { background: var(--mantle); border-color: var(--surface1); }
#route-input:focus-visible { outline-offset: 1px; }
#route-input[aria-invalid="true"] { border-color: var(--red); }
.route-ghost {
  position: absolute;
  inset: 1px;
  padding: 8px 5px;
  overflow: hidden;
  pointer-events: none;
  white-space: pre;
  line-height: 1.4;
  color: var(--muted);
}
#route-ghost-text { display: inline-block; }
#route-ghost-prefix { visibility: hidden; }
#route-error {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  padding: 7px 9px;
  color: var(--red);
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 4px;
}
@media (max-width: 820px) {
  .workspace-top {
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 68px;
    gap: 4px 10px;
    padding-block: 9px;
  }
  .workspace-top .mode-switch { grid-area: 1 / 2; }
  #workspace-nav { grid-area: 2 / 1 / 3 / -1; }
}
@media (max-width: 420px) {
  .workspace-top { padding-inline: 16px; }
  .workspace-top .workspace-label { grid-area: 2 / 1 / 3 / -1; max-width: none; }
  #workspace-nav { grid-area: 3 / 1 / 4 / -1; }
}

.hello-mark {
  font-size: clamp(28px, 10vw, 38px);
  white-space: nowrap;
}
.hello-eye,
.hello-hand {
  display: inline-block;
}
.hello-eye { transform-origin: center 25%; }
.hello-hand { transform-origin: 25% 80%; }

@media (prefers-reduced-motion: no-preference) {
  .shell[data-profile="open"] .hello-eye {
    animation: hello-blink 5s ease-in-out .25s infinite;
  }
  .shell[data-profile="open"] .hello-hand {
    animation: hello-wave 5s ease-in-out .25s infinite;
  }
}
@keyframes hello-wave {
  0%, 23%, 100% { transform: rotate(0); }
  6%, 16% { transform: rotate(27deg); }
  11%, 20% { transform: rotate(-16deg); }
}
@keyframes hello-blink {
  0%, 28%, 32%, 100% { transform: scaleY(1); }
  30% { transform: scaleY(.12); }
}

.pong-game {
  max-width: 720px;
  margin-inline: auto;
}
.pong-score {
  display: flex;
  justify-content: space-between;
  padding: 0 0 10px;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.pong-score :first-child { color: var(--peach); }
.pong-score > :last-child, .pong-score > :last-child strong { color: var(--lavender); }
.pong-score strong { margin-inline-start: 4px; }
.pong-court {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--surface1);
  border-radius: 6px;
  touch-action: none;
}
.pong-court:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }
.pong-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block: 14px; }
.pong-status, #pong-controls { color: var(--muted); font-size: .875rem; line-height: 1.55; }
#pong-controls { margin-bottom: 0; }

.contact-hero {
  --contact-art-size: clamp(28.8rem, 69.6dvh, 43.2rem);
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: var(--contact-art-size);
  overflow: hidden;
  margin-top: 8px;
  padding-block: 24px;
  text-align: center;
  text-shadow: 0 1px 4px var(--crust), 0 0 12px var(--crust);
}
.contact-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 50%;
  width: min(100%, 28rem);
  height: 17rem;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, #1e1e2ec4 18%, #1e1e2e82 46%, transparent 75%);
  pointer-events: none;
}
.contact-hero h2 { width: fit-content; }
.contact-hero .profile-page-intro { color: var(--text); margin-bottom: 12px; }
.contact-hero .contact-links { width: fit-content; }
.contact-hero .contact-links a { font-size: 1rem; padding-block: 8px; }
.contact-sword {
  position: absolute;
  z-index: -2;
  inset: 50% auto auto 50%;
  width: min(120%, 100vw, var(--contact-art-size));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(ellipse, #89b4fa13, transparent 68%);
}
.contact-sword canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.about-page { position: relative; container-type: inline-size; isolation: isolate; }
.about-page h2 { width: fit-content; }
.about-sparks { display: none; }
@container (min-width: calc(70ch + 12rem)) {
  .about-sparks {
    position: absolute;
    display: block;
    z-index: -1;
    top: .5rem;
    bottom: 1.5rem;
    left: calc(70ch + clamp(1rem, 2cqw, 2rem));
    right: .5rem;
    background: radial-gradient(ellipse, #a6e3a110, transparent 69%);
    pointer-events: none;
  }
  .about-sparks canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    image-rendering: pixelated;
  }
}

@media (max-width: 850px) {
  .shell[data-profile-modal] #profile-toggle { top: 80px; }
}
