/* From Uiverse.io by byllzz. Canonical wallet: https://uiverse.io/byllzz/rude-bat-50 */
/* MIT notice: see THIRD-PARTY-NOTICES.txt. Personal content and click states adapted locally. */
:root { color-scheme: light; font: 100%/1.5 Arial, sans-serif; color: #1e341e; background: #e8e8e8; --rescue-bg: oklch(16% .025 205); --rescue-dark: oklch(23% .045 197); --rescue-ink: oklch(96% .015 105); --rescue-muted: oklch(73% .035 175); --rescue-coral: oklch(74% .16 42); --rescue-lime: oklch(88% .13 130); --rescue-line: oklch(39% .03 192); }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #0064d8; outline-offset: 5px; }
[hidden] { display: none !important; }
.scene { min-height: 100svh; display: grid; place-items: center; padding: 80px 0; }
.wallet { position: relative; width: 280px; height: 230px; cursor: pointer; perspective: 1000px; display: flex; justify-content: center; align-items: flex-end; }
.wallet-back { position: absolute; bottom: 0; width: 280px; height: 200px; background: #653d28; border-radius: 22px 22px 60px 60px; z-index: 5; box-shadow: inset 0 25px 35px rgba(0,0,0,.4), inset 0 5px 15px rgba(0,0,0,.5); }
.card { position: absolute; width: 260px; height: 140px; left: 10px; border: 0; border-radius: 16px; padding: 18px; color: white; text-align: left; box-shadow: inset 0 1px 1px rgba(255,255,255,.3), 0 -4px 15px rgba(0,0,0,.1); transform-origin: center; }
.card-inner { display: flex; flex-direction: column; justify-content: space-between; height: 100%; pointer-events: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; line-height: 24px; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.card-mark { height: 24px; width: 24px; stroke: currentColor; stroke-width: 1.5; }
.linkedin-mark { font: bold 22px/24px Arial, sans-serif; letter-spacing: -.04em; }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.label { font-size: 8px; line-height: 12px; opacity: .8; text-transform: uppercase; margin-bottom: 2px; display: block; letter-spacing: .025em; }
.value { font-size: 10px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.card-context { font-size: 10px; line-height: 14px; text-align: right; }
.portfolio { background: #d9e0cb; color: #263c26; bottom: 40px; z-index: 30; }
.linkedin { background: #9bd86a; color: #223b19; bottom: 65px; z-index: 20; }
.rescue { background: var(--rescue-bg); color: var(--rescue-ink); bottom: 90px; z-index: 10; }
.rescue .label { color: var(--rescue-muted); opacity: 1; }
/* Material finishes retain the reference wallet's geometry and fan. */
.wallet::before { content: ''; position: absolute; bottom: -20px; left: 18px; width: 244px; height: 42px; border-radius: 50%; background: #342016; filter: blur(19px); opacity: .24; pointer-events: none; }
.wallet-back { background-color: #653d28; background-image: url('assets/leather-grain.svg'), linear-gradient(120deg, #8b6043, #45291c 76%); border: 1px solid #402718; box-shadow: inset 0 1px 1px #b98864, inset 0 20px 30px #28170fb3, 0 3px 0 #382116, 0 6px 0 #573522; }
.pocket-svg { filter: drop-shadow(0 -2px 1px #2b170f99) drop-shadow(0 2px 0 #b988645e); }
.card { isolation: isolate; overflow: hidden; border: 1px solid #ffffff70; box-shadow: inset 0 1px 0 #ffffff9c, inset 0 -1px 0 #00000026, 0 2px 0 #888d83, 0 3px 0 #d8dccf, 0 5px 0 #00000026, 0 -5px 15px #0d1e1226; }
.card::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(115deg, #ffffff30, transparent 42%, #ffffff12 65%, #0000000d); }
.card::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(ellipse at var(--shine-x, 20%) var(--shine-y, 0%), #ffffff26, transparent 64%); opacity: .45; transition: opacity .2s; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .card:hover::after { opacity: 1; } }
.card-portal > .card { box-shadow: inset 0 1px 0 #ffffff99, inset 0 -1px 0 #00000030, 0 2px 0 #969d90, 0 3px 0 #d8dccf, 0 5px 0 #00000030, 0 22px 30px -12px #11201550, 0 45px 60px -28px #11201540; }
.card-inner { position: relative; }
.linkedin { background-image: linear-gradient(135deg, #b3e88d, #8bc65b); }
.portfolio { font-family: 'Courier New', monospace; border-color: #8c9e7f; background-image: repeating-linear-gradient(0deg, #263c2605 0 1px, transparent 1px 3px), linear-gradient(135deg, #f5f6ed, #d9e0cb); }
.portfolio .card-top { margin: -7px -7px 0; padding: 0 7px; font-size: 17px; line-height: 28px; font-weight: 700; letter-spacing: .5px; }
.portfolio .card-mark { width: 28px; height: 28px; fill: currentColor; stroke: none; shape-rendering: crispEdges; }
.portfolio .value { font-weight: 700; }
.portfolio .card-context { border: 2px solid #8c9e7f; padding: 3px 5px; background: #f5f6ed; box-shadow: 2px 2px 0 #263c26; font-size: 8px; line-height: 11px; }
.portfolio .label { opacity: 1; }
/* Active exhibition palette sampled from the owner's RescueAI reference. */
.rescue { border-color: var(--rescue-line); background-image: radial-gradient(ellipse at 100% 0, #25494a, transparent 65%), linear-gradient(135deg, var(--rescue-dark), var(--rescue-bg)); }
.rescue .card-top { font-size: 12px; letter-spacing: .65px; font-weight: 600; }
.rescue .card-mark { width: 23px; height: 23px; padding: 5px; color: var(--rescue-bg); background: var(--rescue-coral); stroke-width: 3; border-radius: 0; }
.rescue .card-inner::before { content: ''; position: absolute; left: 0; right: 0; top: 35px; height: 1px; background: var(--rescue-line); }
.rescue .value { font-weight: 600; }
.rescue .card-context { color: var(--rescue-lime); font-size: 9px; }
.pocket { position: absolute; bottom: 0; width: 280px; height: 160px; z-index: 40; filter: drop-shadow(0 15px 25px rgba(52,32,22,.4)); pointer-events: none; }
.pocket-svg { display: block; width: 280px; height: 160px; }
.pocket-content { position: absolute; inset: 25px 0 0; text-align: center; z-index: 50; display: flex; justify-content: center; align-items: center; }
.brand { color: #c59b77; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: .03em; text-shadow: 0 1px 1px #dfbc963b, 0 -1px 1px #28170f, 1px 0 1px #28170f; }
.wallet-toggle { position: absolute; inset: 0; z-index: 45; padding: 0; border: 0; border-radius: 22px 22px 60px 60px; background: transparent; }
body[data-mode="stack"] .wallet-toggle { top: 95px; }
.wallet-toggle:active { background: rgba(255,255,255,.035); }
.wallet-prompt { position: absolute; bottom: -38px; font-style: italic; color: #003087; font-size: 14px; font-weight: 600; text-decoration: underline; pointer-events: none; white-space: nowrap; }
.card:active { filter: brightness(.96); }
.modal-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.backdrop { position: absolute; inset: 0; background: rgba(232,232,232,.42); backdrop-filter: blur(10px); pointer-events: auto; }
.back-button { position: fixed; top: max(20px, env(safe-area-inset-top)); left: max(20px, env(safe-area-inset-left)); z-index: 10; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #b8c1b5; border-radius: 8px; color: #1e341e; background: #f8faf6; font-size: 15px; font-weight: 600; pointer-events: auto; }
.back-button svg, .pixel-button svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; }
.card-portal > .card { position: fixed; z-index: 4; pointer-events: auto; }
.card-prompt { position: fixed; top: calc(50% + 132px); left: 0; width: 100%; margin: 0; text-align: center; color: #003087; font-size: 14px; font-weight: 600; font-style: italic; }
.detail-layer { position: fixed; inset: max(24px, 4vh) max(24px, 4vw); z-index: 200; pointer-events: none; }
.resume-window { height: 100%; display: flex; flex-direction: column; border: 1px solid #8c9e7f; background: #f5f6ed; box-shadow: 0 8px 32px #263c2624; pointer-events: auto; }
.resume-toolbar { flex: none; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 20px; color: #263c26; background: #d9e0cb; border-bottom: 1px solid #8c9e7f; font: bold 1rem/1.2 'Courier New', monospace; }
.pixel-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; flex: none; padding: 8px 12px; border: 1px solid #8c9e7f; border-radius: 0; color: #263c26; background: #f5f6ed; font: bold .875rem/1.4 'Courier New', monospace; }
.pixel-button:active { background: #d9e0cb; }
.resume-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overflow-wrap: anywhere; overscroll-behavior: contain; scrollbar-color: #8c9e7f #f5f6ed; }
.resume-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: start; }
.resume-nav { position: sticky; top: 0; padding: 32px 24px; display: flex; flex-direction: column; gap: 8px; font: bold .875rem/1.4 'Courier New', monospace; }
.resume-nav a { min-height: 44px; padding: 12px 0; color: #263c26; text-decoration: none; }
.resume-nav a:hover { text-decoration: underline; }
.resume-content { max-width: 940px; min-width: 0; padding: 44px 48px 56px 26px; color: #263c26; }
.resume-name { margin: 0 0 12px; font: bold clamp(1.75rem, 3.2vw, 2.875rem)/1.12 'Courier New', monospace; letter-spacing: -.045em; }
.resume-role { max-width: 62ch; margin: 0 0 32px; font-size: 1rem; line-height: 1.55; font-weight: 600; }
.resume-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.resume-contact a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid #8c9e7f; color: #263c26; text-underline-offset: 3px; }
.resume-content .resume-role { margin-bottom: 12px; }
.resume-section { margin-top: 40px; scroll-margin-top: 24px; }
.resume-section h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font: bold 1.3125rem/1.3 'Courier New', monospace; letter-spacing: -.025em; }
.section-icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; flex: none; shape-rendering: crispEdges; }
.resume-content p, .resume-content li { font-size: 1rem; line-height: 1.7; }
.resume-content p { margin: 0 0 14px; max-width: 76ch; }
.experience-entry + .experience-entry, .education-entry + .education-entry { margin-top: 28px; }
.entry-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.entry-top h3 { margin: 0; font-size: 1.0625rem; line-height: 1.5; }
.entry-top time, .entry-date { font-size: .875rem; line-height: 1.5; color: #55664e; }
.entry-role { margin-top: 5px !important; font-weight: 600; }
.resume-content ul { padding-left: 22px; margin: 10px 0 0; }
.resume-content li { padding-left: 4px; margin-top: 5px; }
.education-entry { padding-bottom: 18px; border-bottom: 1px solid #cad3bd; }
.education-entry p { margin-top: 8px; }
.skills-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin: 0; }
.skills-list dt { font-weight: 700; font-size: .9375rem; margin-bottom: 8px; }
.skills-list dd { margin: 0; font-size: 1rem; line-height: 1.7; }
.project-page { max-width: 850px; margin: 0 auto; padding: 44px 48px 64px; }
.project-page h1 { font: bold clamp(1.875rem,4vw,2.875rem)/1.15 'Courier New',monospace; letter-spacing: -.04em; margin: 0 0 16px; }
.project-page p, .project-page li { font-size: 1rem; line-height: 1.7; }
.project-page h2 { font: bold 1.375rem/1.3 'Courier New',monospace; margin-top: 32px; }
.project-page li { margin-bottom: 14px; }
.sr-only { position: absolute; top: 0; left: 0; margin: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
@media (max-width: 680px) {
  .detail-layer { inset: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
  .resume-toolbar { padding: 7px 14px; }
  .resume-layout { grid-template-columns: 1fr; }
  .resume-nav { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 8px 20px; border-bottom: 1px solid #cad3bd; }
  .resume-nav a { padding: 12px 0; }
  .resume-content { padding: 28px 22px 40px; }
  .resume-name { font-size: clamp(1.6875rem,7.5vw,2.5rem); }
  .resume-role { font-size: .9375rem; }
  .resume-section { margin-top: 32px; }
  .skills-list { grid-template-columns: 1fr; gap: 24px; }
  .project-page { padding: 28px 22px 40px; }
  .card-prompt { top: calc(50% + 110px); }
}
@media (prefers-reduced-transparency: reduce) { .backdrop { background: #e8e8e8; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .card::after { transition: none; } .resume-scroll { scroll-behavior: auto; } }
@media (prefers-contrast: more) { .backdrop { background: #e8e8e8; backdrop-filter: none; } .card { outline: 2px solid currentColor; } .label { opacity: 1; } }
@media (forced-colors: active) { .wallet-back { background: CanvasText; } .pocket-svg > path[fill] { fill: CanvasText; filter: none; } .brand { color: Canvas; } .card { border: 2px solid ButtonText; } }

/* The exhibition keeps its own styles, scrolling and GSAP document. */
.detail-layer.exhibition-detail { inset: 0; }
.exhibition-detail .resume-window { border: 0; background: #07191b; }
.exhibition-detail .resume-toolbar { display: none; }
.exhibition-detail .resume-scroll { display: flex; overflow: hidden; }
.project-exhibition { display: block; width: 100%; height: 100%; flex: 1; min-width: 0; min-height: 0; border: 0; }

/* Keep phone controls readable without changing the desktop wallet geometry. */
@media (max-width: 999px) {
  .scene { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  body[data-mode="focused"], body[data-mode="detail"] { overflow: hidden; }
  .card-portal > .card .label { font-size: 10px; line-height: 1.4; }
  .card-portal > .card .value { font-size: 12px; line-height: 1.5; }
  .card-portal > .card .card-context { font-size: 11px; line-height: 1.35; }
  .card-portal > .portfolio .card-context { font-size: 10px; }
}
@media (max-width: 680px), (max-width: 999px) and (max-height: 500px) {
  .detail-layer { inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .resume-toolbar { flex-wrap: wrap; }
  .resume-layout { grid-template-columns: 1fr; }
  .resume-nav { position: static; display: flex; flex-direction: row; flex-wrap: wrap; gap: 0 16px; padding: 8px 16px; border-bottom: 1px solid #cad3bd; }
  .resume-nav a { min-height: 44px; padding: 12px 0; white-space: nowrap; }
  .resume-content { padding: 26px 18px 40px; }
  .skills-list { grid-template-columns: 1fr; }
}
@media (max-width: 999px) and (max-height: 500px) {
  .scene { padding-top: max(90px, env(safe-area-inset-top)); padding-bottom: max(48px, env(safe-area-inset-bottom)); }
  .resume-nav { padding-block: 4px; }
}
/* The full-screen project keeps its own safe-area-aware header. */
.detail-layer.exhibition-detail { inset: 0; }

/* A separate Retro ID pin stays attached to the wallet, outside the card stack. */
.wallet-qr-pin { position: absolute; right: 13.75px; bottom: 13.75px; z-index: 60; display: block; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.wallet-qr-badge { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: scale(.64); transform-origin: bottom right; pointer-events: none; }
.wallet-qr-pin img { display: block; width: 35.2px; height: 35.2px; image-rendering: pixelated; }
.wallet-qr-pin:focus-visible { outline: none; }
.wallet-qr-pin:focus-visible img { outline: 1px solid #fff; outline-offset: 2px; }
.qr-close { left: auto; right: max(20px, env(safe-area-inset-right)); width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 28px; line-height: 1; }
.qr-id-card { position: fixed; top: 50%; left: 50%; z-index: 5; display: flex; flex-direction: column; align-items: center; width: min(320px, calc(100vw - 40px)); padding: 26px 20px 18px; border: 3px solid #70452e; border-radius: 0; background: #f1eadb; box-shadow: 6px 6px 0 #70452e; color: #263c26; font-family: 'Courier New', monospace; pointer-events: auto; transform: translate(-50%, -50%); transform-origin: center; }
.qr-id-card::before { content: ''; position: absolute; top: 10px; left: calc(50% - 22px); width: 44px; height: 8px; background: #70452e; }
.qr-id-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-bottom: 10px; border-bottom: 2px solid #bca684; font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.qr-id-avatar { width: 28px; height: 28px; fill: #70452e; shape-rendering: crispEdges; }
.qr-id-code { display: block; flex: none; width: 222px; height: 222px; margin: 14px 0; background: #fff; image-rendering: pixelated; }
.qr-id-caption { font-size: 14px; font-weight: 700; line-height: 1.5; }
.qr-id-url { margin-top: 4px; font-size: 11px; line-height: 1.5; }
.qr-id-tag { margin-top: 12px; padding: 4px 6px; border: 1px solid #bca684; color: #70452e; font-size: 10px; line-height: 1.5; font-weight: 700; }
@media (max-width: 999px) { body[data-mode="qr"] { overflow: hidden; } }
@media (max-height: 500px) {
  .qr-id-card { width: 238px; padding: 20px 16px 14px; }
  .qr-id-heading { font-size: 20px; padding-bottom: 6px; }
  .qr-id-avatar { width: 24px; height: 24px; }
  .qr-id-code { width: 148px; height: 148px; margin: 8px 0; }
  .qr-id-caption { font-size: 12px; }
  .qr-id-url { margin-top: 3px; font-size: 10px; }
  .qr-id-tag { margin-top: 8px; font-size: 9px; padding: 3px 5px; }
}
@media (prefers-contrast: more) { .qr-id-card { outline: 2px solid #263c26; } .wallet-qr-pin img { outline: 1px solid #fff; outline-offset: 2px; } }
