:root {
  --blue-top: #1b55d3;
  --blue-mid: #2c79df;
  --blue-low: #5eaaee;
  --cream: #f1ebdf;
  --ink: #12131a;
  --red: #e0333a;
  --rail-y: 76px;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ui: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

/* nav + depot caption */
.logo, .links, .talk, .caption { font-family: var(--ui); }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  font-family: var(--sans);
  color: var(--cream);
  background: linear-gradient(180deg, var(--blue-top) 0%, var(--blue-mid) 52%, var(--blue-low) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px clamp(16px, 3vw, 40px);
}
.logo {
  justify-self: start;
  font-weight: 700; font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: 0.02em; text-decoration: none;
}
.links { display: flex; gap: clamp(14px, 2.4vw, 34px); font-size: 13px; font-weight: 500; }
.links button { opacity: .9; }
.links button:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.talk { justify-self: end; font-size: 13px; font-weight: 600; }
.talk:hover { text-decoration: underline; text-underline-offset: 4px; }

.caption {
  position: fixed; z-index: 10; left: clamp(16px, 3vw, 40px); top: calc(var(--rail-y) + 18px);
  margin: 0; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .75;
}

/* ---------- stage ---------- */
.stage { position: fixed; inset: 0; }
.giant {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  margin: 0; white-space: nowrap; line-height: .8; width: max-content;
  font-weight: 900; font-stretch: 125%; letter-spacing: -0.035em;
  font-size: 20vw; color: var(--cream);
  user-select: none; pointer-events: none;
  opacity: 0; transition: opacity .8s ease;
}
.ready .giant { opacity: 1; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease .15s; }
.ready #scene { opacity: 1; }

/* ---------- panel inside the open container ---------- */
.panel {
  position: fixed; z-index: 5; left: 0; top: 0; width: 0; height: 0;
  container-type: size;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 7cqw;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
  overflow: hidden;
}
.panel.show { opacity: 1; pointer-events: auto; }
.panel .kicker {
  margin: 0 0 1.6cqh; font-size: max(9px, 1.7cqw); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .8;
}
.panel h2 {
  margin: 0 0 2.2cqh; font-weight: 800; font-size: clamp(18px, 6.6cqw, 54px); letter-spacing: -0.035em; line-height: 1;
}
.panel h2 em, .sheet h2 em { font-family: var(--serif); font-weight: 400; color: var(--red); letter-spacing: -0.01em; }
.panel p { margin: 0 0 3cqh; font-size: max(11px, 2.15cqw); line-height: 1.45; max-width: 64ch; opacity: .85; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 3cqh; }
.chips span {
  border: 1px solid rgba(241, 235, 223, .45); border-radius: 999px;
  padding: .35em .85em; font-size: max(10px, 1.6cqw); font-weight: 600; white-space: nowrap;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button, .actions .btn {
  display: inline-block; text-decoration: none;
  background: var(--cream); color: var(--ink); border-radius: 999px;
  padding: .6em 1.1em; font-size: max(10.5px, 1.65cqw); font-weight: 700; letter-spacing: .02em;
  transition: transform .15s ease;
}
.actions .ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(241,235,223,.6); }
.actions button:hover, .actions .btn:hover { transform: translateY(-1px); }
.actions [data-unload]::after { content: " \2193"; }
.panel-close {
  position: absolute; right: 2.5cqw; top: 3cqh;
  font-size: max(16px, 2.6cqw); line-height: 1; opacity: .7;
}
.panel-close:hover { opacity: 1; }

/* small containers (phones): keep it to the essentials */
@container (max-height: 190px) {
  .panel p, .panel .chips { display: none; }
  .panel h2 { margin-bottom: 10px; }
}

/* ---------- pick-a-container pill ---------- */
.pill-wrap { position: fixed; z-index: 10; left: 50%; bottom: 14px; transform: translateX(-50%); }
.pill {
  background: rgba(14, 28, 72, .42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 999px; padding: 8px 14px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.menu {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 210px; padding: 6px; border-radius: 14px;
  background: rgba(14, 22, 48, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; gap: 2px;
}
.menu[hidden] { display: none; }
.menu button {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left;
}
.menu button:hover, .menu button:focus-visible { background: rgba(255,255,255,.1); }
.menu i { width: 18px; height: 11px; border-radius: 2px; flex: none; }
.menu small { margin-left: auto; opacity: .5; font-weight: 600; }

/* ---------- manifest sheet ---------- */
.sheet {
  width: min(880px, 100vw); max-width: 100vw; max-height: min(88vh, 100dvh);
  margin: auto auto 0; padding: 0; border: 0; border-radius: 22px 22px 0 0;
  background: #f4efe5; color: var(--ink);
  overflow: hidden;
}
.sheet[open] { animation: rise .45s cubic-bezier(.2, .9, .2, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet::backdrop { background: rgba(8, 18, 50, .55); backdrop-filter: blur(3px); }
.sheet-body { max-height: min(88vh, 100dvh); overflow: auto; padding: 34px clamp(20px, 5vw, 56px) 56px; }
.sheet-close { position: absolute; right: 16px; top: 12px; font-size: 30px; line-height: 1; color: var(--ink); opacity: .6; z-index: 1; }
.sheet-close:hover { opacity: 1; }
.sheet .kicker { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #5b5f70; }
.sheet h2 { margin: 0 0 24px; font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.sheet h2 em { color: #c8232b; }

.sec { margin: 34px 0 12px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #5b5f70; }
.sec:first-child { margin-top: 0; }
.note { color: #4a4e5c; font-size: 14px; line-height: 1.55; }
.card { border-top: 1px solid #d9d2c3; padding: 22px 0; }
.card:first-child { border-top: 0; padding-top: 0; }
.card h4 { margin: 4px 0 10px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.card p, .card li, .list li, .steps p, .skills dd { font-size: 15px; line-height: 1.6; color: #2a2c36; }
.card p { margin: 0 0 10px; }
.card ul { margin: 0 0 12px; padding-left: 18px; }
.card li { margin-bottom: 6px; }
.meta { font-size: 12px !important; font-weight: 600; color: #6a6e7c !important; letter-spacing: .02em; }
.check { background: #e8e1d2; border-radius: 10px; padding: 10px 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.links a { font-weight: 700; font-size: 14px; color: #1b55d3; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.card a, .list a { color: #1b55d3; }
code { font-size: .88em; background: #e5ddcc; padding: 1px 5px; border-radius: 4px; }

.list { padding-left: 18px; }
.list li { margin-bottom: 10px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6a6e7c; padding: 8px 10px 8px 0; border-bottom: 1px solid #d9d2c3; }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid #e3dccd; vertical-align: top; }
td:nth-child(3) { font-weight: 800; }
td small { display: block; font-size: 11px; color: #8a8d99; margin-top: 2px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid #d9d2c3; }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps span { font-weight: 900; font-stretch: 125%; font-size: 22px; color: #c8232b; }
.steps h4 { margin: 2px 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.steps p { margin: 0; }

.skills { display: grid; grid-template-columns: 150px 1fr; gap: 12px 20px; margin: 0; }
.skills dt { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #5b5f70; padding-top: 4px; }
.skills dd { margin: 0; }

.contact { list-style: none; margin: 0; padding: 0; }
.contact li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid #d9d2c3; font-size: 16px; }
.contact li:first-child { border-top: 0; }
.contact span { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #5b5f70; padding-top: 4px; }
.contact a { color: #1b55d3; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.contact p { margin: 0; }

@media (max-width: 640px) {
  .links { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .skills { grid-template-columns: 1fr; gap: 4px; }
  .skills dd { margin-bottom: 12px; }
  .contact li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- fallback (no WebGL / no JS): a plain readable page ---------- */
body.fallback { overflow: auto; }
.fallback .stage, .fallback .pill-wrap, .fallback .caption, .fallback .panel { display: none; }
.fallback #cargo, #cargo:not([hidden]) {
  display: block; max-width: 860px; margin: 90px auto 60px; padding: 0 20px;
}
.fallback #cargo article, noscript ~ #cargo article {
  background: #f4efe5; color: var(--ink); border-radius: 20px; padding: 28px; margin-bottom: 20px;
}
.fallback #cargo .summary h2 { font-size: 40px; margin: 0 0 12px; letter-spacing: -0.03em; }
.fallback #cargo .summary h2 em { font-family: var(--serif); font-weight: 400; color: #c8232b; }
.fallback #cargo .actions, .fallback #cargo .chips { display: none; }
.fallback #cargo .kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #5b5f70; }

.certs { list-style: none; margin: 0; padding: 0; }
.certs li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid #d9d2c3; }
.certs li:first-child { border-top: 0; }
.certs .c-name { font-size: 15px; font-weight: 600; color: #2a2c36; }
.certs .c-type { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a6a12; background: #eee2bf; border-radius: 999px; padding: 5px 11px; white-space: nowrap; }

.courses { display: grid; grid-template-columns: 130px 1fr; gap: 8px 18px; margin: 4px 0 0; }
.courses dt { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #5b5f70; padding-top: 3px; }
.courses dd { margin: 0; font-size: 15px; line-height: 1.55; color: #2a2c36; }
@media (max-width: 640px) { .courses { grid-template-columns: 1fr; gap: 2px; } .courses dd { margin-bottom: 10px; } }

/* ---------- photo ---------- */
.panel.with-photo { flex-direction: row; align-items: center; gap: 5cqw; padding-left: 5cqw; }
.panel .text { min-width: 0; }
.badge {
  flex: none; margin: 0; height: 78cqh; aspect-ratio: 3 / 4.25;
  background: #f4efe5; padding: 2.2cqh 2.2cqh 0; border-radius: 6px;
  display: flex; flex-direction: column;
  transform: rotate(-3deg); box-shadow: 0 10px 24px rgba(0,0,0,.45);
}
.badge img { width: 100%; flex: 1; min-height: 0; object-fit: cover; object-position: 50% 20%; border-radius: 3px; display: block; }
.badge figcaption {
  padding: 1.6cqh 0; text-align: center; color: var(--ink);
  font-family: var(--ui); font-size: max(7px, 1.25cqw); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
@container (max-height: 190px) {
  .badge figcaption { display: none; }
  .badge { padding-bottom: 2.2cqh; }
}

.fallback .art { display: none; }


/* ---------- cards inside containers ---------- */
.panel .art { flex: none; }

/* The Work: fanned stack of screenshots */
.fan { position: relative; margin: 0; height: 74cqh; aspect-ratio: 1.12; }
.fan img {
  position: absolute; left: 0; top: 50%; width: 92%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left;
  border: max(3px, 1.1cqh) solid #f4efe5; border-radius: 6px; background: #f4efe5;
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
  transition: transform .4s cubic-bezier(.2,.9,.2,1);
}
.fan img:nth-child(1) { transform: translate(8%, -78%) rotate(7deg); }
.fan img:nth-child(2) { transform: translate(4%, -62%) rotate(-5deg); }
.fan img:nth-child(3) { transform: translate(0, -42%) rotate(-1.5deg); }
.fan img:nth-child(1) { object-position: center; }
.fan:hover img:nth-child(1) { transform: translate(14%, -88%) rotate(10deg); }
.fan:hover img:nth-child(2) { transform: translate(6%, -66%) rotate(-7deg); }

/* Say hello: shipping label with a QR code */
.ship-label {
  height: 78cqh; aspect-ratio: 3 / 4.1;
  display: flex; flex-direction: column; text-decoration: none;
  background: #f4efe5; color: var(--ink); border-radius: 6px; padding: 2.2cqh;
  transform: rotate(3deg); box-shadow: 0 10px 24px rgba(0,0,0,.45);
  font-family: var(--ui);
}
.sl-top {
  display: flex; flex-direction: column; border-bottom: 2px solid var(--ink); padding-bottom: 1.2cqh; margin-bottom: 1.6cqh;
  font-size: max(10px, 2cqw); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05;
}
.sl-top small { font-size: .55em; letter-spacing: .16em; opacity: .6; }
.qr { flex: 1; min-height: 0; display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.sl-bottom {
  margin-top: 1.4cqh; padding-top: 1.2cqh; border-top: 1px dashed rgba(18,19,26,.4);
  font-size: max(7px, 1.15cqw); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center;
}
@container (max-height: 190px) {
  .sl-top small, .sl-bottom { display: none; }
}

/* About: certificate stack */
.certs-fan img { aspect-ratio: 842 / 595; object-fit: cover; object-position: center; border-width: max(2px, .6cqh); }
.certs a.c-name { text-decoration: none; }
.certs a.c-name:hover { color: #1b55d3; text-decoration: underline; text-underline-offset: 3px; }
.star { background: #1b55d3; color: #f4efe5; border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.star strong { font-weight: 800; letter-spacing: .02em; }

/* About sheet: photo header */
.about-head { display: flex; align-items: center; gap: 20px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid #d9d2c3; }
.about-head .portrait { flex: none; width: clamp(88px, 18vw, 120px); height: auto; aspect-ratio: 1; object-fit: cover; object-position: 50% 22%; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 8px 20px rgba(0,0,0,.12); }
.about-head h4 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.about-head p { margin: 0; font-size: 14px; line-height: 1.55; color: #4a4e5c; }

/* ---------- paper tags (Process, Tool kit, What I do) ---------- */
.tag-card {
  position: relative; height: 78cqh; aspect-ratio: 3 / 4.1;
  display: flex; flex-direction: column;
  background: #f4efe5; color: var(--ink); border-radius: 6px; padding: 2.4cqh 2.4cqh 2cqh;
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
  font-family: var(--ui); font-size: max(7.5px, 1.32cqw);
}
.tc-head {
  display: flex; flex-direction: column; border-bottom: 2px solid var(--ink); padding-bottom: 1.2cqh; margin-bottom: 1.6cqh;
  font-size: 1.55em; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; line-height: 1.05;
}
.tc-head small { font-size: .5em; letter-spacing: .16em; opacity: .6; margin-bottom: .3em; }

/* Process: inspection tag with a stamp */
.inspect { transform: rotate(-2.5deg); }
.tc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75em; font-weight: 600; }
.tc-list li { display: flex; align-items: center; gap: .6em; }
.tc-list li::before {
  content: "\2713"; flex: none; display: grid; place-items: center; width: 1.35em; height: 1.35em;
  border: 1.5px solid var(--ink); border-radius: 3px; font-size: .9em; font-weight: 800; color: #c8232b;
}
.stamp {
  position: absolute; right: 6%; bottom: 8%; transform: rotate(-14deg);
  border: .22em solid #c8232b; border-radius: .3em; padding: .15em .5em;
  color: #c8232b; font-size: 1.9em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  opacity: .85; mix-blend-mode: multiply;
}

/* Tool kit: packing slip with a torn edge */
.receipt { transform: rotate(2.5deg); border-radius: 6px 6px 0 0; }
.receipt::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px;
  background: linear-gradient(-45deg, transparent 5px, #f4efe5 0) 0 0 / 10px 8px repeat-x,
              linear-gradient(45deg, transparent 5px, #f4efe5 0) 0 0 / 10px 8px repeat-x;
}
.tc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .38em; font-weight: 600; }
.tc-rows li { display: flex; align-items: baseline; gap: .4em; white-space: nowrap; }
.tc-rows i { flex: 1; border-bottom: 1.5px dotted rgba(18,19,26,.35); transform: translateY(-.25em); }
.tc-rows li span:last-child { font-size: .8em; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.barcode {
  margin-top: auto; height: 2.6em;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px);
}

/* What I do: luggage tag on a string */
.luggage { transform: rotate(3deg); clip-path: polygon(18% 0, 82% 0, 100% 9%, 100% 100%, 0 100%, 0 9%); border-radius: 0 0 6px 6px; padding-top: 6cqh; }
.hole { position: absolute; top: 1.8cqh; left: 50%; width: 2.6cqh; height: 2.6cqh; transform: translateX(-50%); border-radius: 50%; background: #10162a; box-shadow: inset 0 0 0 .5cqh #c9a94a; }
.tc-kv { display: grid; grid-template-columns: auto 1fr; gap: .55em .8em; margin: 0; }
.tc-kv dt { font-size: .78em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .55; padding-top: .15em; }
.tc-kv dd { margin: 0; font-weight: 700; }
.tc-code {
  margin-top: auto; padding-top: 1cqh; border-top: 1px dashed rgba(18,19,26,.4);
  font-size: 1.5em; font-weight: 800; letter-spacing: .04em; text-align: center; color: #c8232b;
}

/* phones: keep only the headline of each tag */
@container (max-height: 190px) {
  .tc-list, .tc-rows, .tc-kv, .tc-head small { display: none; }
  .barcode { margin-top: 1.2em; height: 3.2em; }
  .tag-card { justify-content: center; }
  .tc-head { border: 0; margin: 0; text-align: center; }
  .stamp { position: static; align-self: center; margin-top: 1em; font-size: 1.3em; }
}
