/* eliott.website: a soft sky theme, an isometric block desk, and offset block shadows. */
:root {
  --sky: #cfe6f2; --ink: #10203a; --soft: #3d4f66; --card: #e4f1f8; --line: #a9c6d6;
  --btn: #10203a; --btn-ink: #ffffff; --shade: #10203a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --sky: #121833; --ink: #e8eef8; --soft: #a9b6cc; --card: #1a2242; --line: #2d3863;
  --btn: #ffc83a; --btn-ink: #121833; --shade: #05081a;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--sky); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--ink); font: 400 17px/1.55 Figtree, system-ui, sans-serif; transition: background-color .35s; overflow-x: hidden; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 60; background: var(--ink); color: var(--sky); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px 56px; }

/* Header */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 6px; }
.brand { font-weight: 700; text-decoration: none; -webkit-user-select: none; user-select: none; }
.ctrls { display: flex; gap: 8px; align-items: center; }
.seg { display: flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg button { font: 600 14px Figtree, sans-serif; background: none; color: var(--ink); border: 0; min-width: 40px; min-height: 36px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--sky); }
.daynight, .cmdk-btn { font: 600 14px Figtree, sans-serif; border: 2px solid var(--ink); background: none; color: var(--ink); border-radius: 8px; min-height: 40px; padding: 0 12px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.daynight svg { width: 18px; height: 18px; }
.cmdk-btn { display: none; }
.cmdk-btn kbd { font: inherit; }
@media (hover: hover) and (pointer: fine) and (min-width: 720px) { .cmdk-btn { display: inline-flex; } }
@media (max-width: 400px) { .daynight { padding: 0 9px; } .daynight span { display: none; } }

/* Hero: the profile on one side, the desk on the other */
.hero { display: grid; gap: 22px; padding-top: 12px; }
.profile-top { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.photo { width: 96px; height: 96px; object-fit: cover; object-position: 50% 15%; border-radius: 16px; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--shade); flex: none; }
.name { font: 800 clamp(34px, 8.5vw, 54px)/1.03 Figtree, sans-serif; letter-spacing: -.02em; margin: 0; }
.role { font-weight: 700; font-size: 19px; margin: 0 0 8px; }
.intro p { margin: 0 0 10px; max-width: 52ch; }
.avail { display: inline-block; font-weight: 700; border: 2px solid var(--ink); border-radius: 8px; padding: 4px 10px; background: var(--card); box-shadow: 3px 3px 0 var(--shade); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 2px solid var(--ink); text-decoration: none; font: 700 15px Figtree, sans-serif; color: var(--ink); background: none; cursor: pointer; }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 44px; padding-top: 32px; }
  .profile-top { flex-direction: column; align-items: flex-start; gap: 22px; }
  .photo { width: 176px; height: 176px; border-radius: 22px; box-shadow: 8px 8px 0 var(--shade); }
}

/* The desk */
.stage { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.stage .inner { position: relative; width: max-content; }
.stage canvas { display: block; touch-action: pan-y; cursor: pointer; }
.stage[data-tool="pick"] canvas { cursor: crosshair; }
.stage[data-tool="place"] canvas { cursor: copy; }
.hit { position: absolute; background: none; border: 0; padding: 0; pointer-events: none; border-radius: 6px; }
.hit:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hint { margin: 4px 0 10px; color: var(--soft); font-size: 15px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.hotbar { display: flex; gap: 5px; flex-wrap: wrap; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tools[hidden] { display: none; }
.tool { min-width: 44px; min-height: 40px; border-radius: 8px; border: 2px solid var(--ink); background: none; color: var(--ink); font: 600 14px Figtree, sans-serif; cursor: pointer; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; }
.tool[aria-pressed="true"], .tool[aria-expanded="true"] { background: var(--ink); color: var(--sky); }
.tool .sw { width: 14px; height: 14px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.slot { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--ink); background: var(--card); cursor: pointer; display: grid; place-items: center; font: 700 13px Figtree, sans-serif; position: relative; padding: 0; }
.slot::before { content: ""; position: absolute; inset: 5px; border-radius: 4px; background: var(--pc); }
.slot span { position: relative; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.slot[aria-current="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }

.panel { margin-top: 12px; border: 2px solid var(--ink); border-radius: 10px; padding: 14px 16px; background: var(--card); min-height: 92px; }
.panel h2 { margin: 0 0 2px; font-size: 20px; }
.panel .tag { margin: 0 0 8px; color: var(--soft); font-size: 15px; }
.panel p { margin: 0 0 10px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.panel .who { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.panel .who img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.panel .who p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: var(--sky); padding: 10px 16px; border-radius: 8px; font-weight: 700; font-size: 15px; z-index: 70; max-width: calc(100% - 32px); text-align: center; }
.toast[hidden] { display: none; }

/* Sections */
section.block { margin-top: 56px; scroll-margin-top: 16px; }
h2.title { font: 800 clamp(26px, 6vw, 34px)/1.15 Figtree, sans-serif; margin: 0 0 20px; letter-spacing: -.01em; }
h3.subtitle { font: 800 22px/1.2 Figtree, sans-serif; margin: 0 0 6px; }

/* Projects */
.projects { display: grid; gap: 28px; }
@media (min-width: 900px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.proj { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; scroll-margin-top: 20px; border-radius: 10px; }
.proj .icon { width: 64px; height: 64px; display: block; }
.proj h3 { margin: 4px 0 0; font-size: 22px; line-height: 1.2; }
.proj .meta { margin: 2px 0 8px; color: var(--soft); font-size: 15px; }
.proj .meta b { color: var(--ink); font-weight: 600; }
.proj .line { font-weight: 600; margin: 0 0 6px; }
.proj p { margin: 0 0 8px; }
.proj ul { margin: 0 0 10px; padding-left: 18px; }
.proj li { margin-bottom: 4px; }
.proj .stack { color: var(--soft); font-size: 15px; }
.proj-acts { align-items: center; margin: 2px 0 12px; }
.proj-acts .host { font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.btn.app { gap: 8px; }
.btn.app .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--pc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); flex: none; }
.proj.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--pc) 30%, transparent); } 100% { background: transparent; } }
.shots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 4px 0 10px; }
.shots img { height: 200px; width: auto; border-radius: 6px; border: 2px solid var(--ink); flex: none; background: var(--card); }
.shots img.wide { height: auto; width: 100%; flex: 1 1 auto; }
pre.term { font: 13px/1.5 var(--mono); border: 2px solid var(--ink); border-radius: 6px; padding: 10px 12px; overflow-x: auto; margin: 4px 0 10px; }

/* About: a path of stops, oldest to now */
.path { list-style: none; margin: 0; padding: 0; display: grid; }
.stop { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; align-content: start; position: relative; padding-bottom: 30px; }
.stop-art { width: 112px; height: 112px; display: block; }
.stop:not(:last-child)::after { content: ""; position: absolute; left: 53px; top: 118px; bottom: 6px; border-left: 6px dashed var(--line); }
.stop .years { display: inline-block; font-weight: 800; font-size: 14px; border: 2px solid var(--ink); border-radius: 8px; padding: 2px 8px; background: var(--card); box-shadow: 3px 3px 0 var(--shade); margin: 6px 8px 10px 0; }
.stop .nowtag { display: inline-block; font-weight: 800; font-size: 14px; border-radius: 8px; padding: 4px 10px; background: var(--btn); color: var(--btn-ink); }
.stop h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.25; }
.stop p { margin: 0; color: var(--soft); max-width: 46ch; }
@media (min-width: 900px) {
  .path { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .stop { grid-template-columns: 1fr; padding-bottom: 0; }
  .stop-art { width: 150px; height: 150px; }
  .stop:not(:last-child)::after { left: 168px; right: -16px; top: 72px; bottom: auto; border-left: 0; border-top: 6px dashed var(--line); }
}

/* Languages: block towers, one block per CEFR level */
.langs { margin-top: 36px; }
.towers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; max-width: 460px; }
.tower { position: relative; display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 44px 4px 8px; cursor: pointer; color: var(--ink); font: inherit; border-radius: 10px; }
.tower:hover { background: var(--card); }
.tower canvas { display: block; }
.tower b { font-size: 16px; margin-top: 4px; }
.tower .lv { font-size: 14px; color: var(--soft); text-align: center; line-height: 1.3; }
.bubble { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--card); border: 2px solid var(--ink); border-radius: 10px;
  padding: 3px 10px; font-weight: 800; font-size: 14px; box-shadow: 3px 3px 0 var(--shade); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 11px; height: 11px; background: var(--card); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.bubble[hidden] { display: none; }

/* Tools: an inventory of letter blocks, coloured by what they are for */
.legend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--soft); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .inventory { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
.item { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 8px 4px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); color: var(--ink);
  cursor: pointer; font: 600 12.5px/1.2 Figtree, sans-serif; text-align: center; box-shadow: 3px 3px 0 var(--shade); transition: transform .12s, box-shadow .12s; }
.item:hover, .item[aria-pressed="true"] { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shade); }
.item[aria-pressed="true"] { background: var(--sky); }
.tool-info { margin-top: 14px; min-height: 0; }
.tool-info h3 { margin: 0 0 2px; font-size: 19px; }

/* Contact: a mailbox and a postcard */
.mail { display: grid; gap: 18px; }
.mail-side { display: flex; gap: 14px; align-items: center; }
.mailbox { flex: none; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 12px; }
.mailbox canvas { display: block; width: 128px; height: 128px; }
.mailbox:hover canvas { transform: translateY(-2px); }
.mailnote { position: relative; margin: 0; flex: 1; background: var(--card); border: 2px solid var(--ink); border-radius: 10px; padding: 10px 12px; box-shadow: 3px 3px 0 var(--shade); font-size: 15px; line-height: 1.45; }
.mailnote::before { content: ""; position: absolute; left: -8px; top: calc(50% - 6px); width: 12px; height: 12px; background: var(--card); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.mailnote .ps { font-weight: 800; margin-right: 4px; }
.mailnote kbd { font: 700 13px var(--mono); border: 2px solid var(--ink); border-bottom-width: 3px; border-radius: 5px; padding: 0 5px; background: var(--sky); }
@media (min-width: 900px) {
  .mail { grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
  .mail-side { flex-direction: column; align-items: stretch; gap: 16px; }
  .mailbox { align-self: center; }
  .mailbox canvas { width: 200px; height: 200px; }
  .mailnote::before { left: calc(50% - 6px); top: -8px; transform: rotate(135deg); }
}

.postcard { max-width: 780px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: 6px 6px 0 var(--shade); padding: 18px;
  display: grid; gap: 14px 16px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "msg" "stamp" "lines" "acts"; }
.pc-msg { grid-area: msg; }
.pc-msg p { margin: 0 0 10px; }
.pc-hello { font-weight: 700; }
.pc-sign { font-weight: 800; font-size: 19px; }
.pc-late { color: var(--soft); }
.pc-acts { grid-area: acts; }
.pc-rule { display: none; grid-area: rule; background: var(--line); border-radius: 2px; }
/* The stamp is the vCard QR; the postmark beside it carries the live local time. */
.pc-stamp { grid-area: stamp; margin: 0; display: grid; justify-items: end; align-content: start; gap: 8px; position: relative; }
.pc-stamp figcaption { font-size: 13px; color: var(--soft); text-align: right; line-height: 1.3; }
.perf { width: 110px; padding: 6px; line-height: 0;
  background: radial-gradient(circle, transparent 3.2px, #fff 3.7px) -5px -5px / 10px 10px; filter: drop-shadow(0 0 1px rgba(16, 32, 58, .6)); }
.perf svg { display: block; width: 100%; height: auto; background: #fff; }
.postmark { display: flex; align-items: center; position: absolute; z-index: 1; right: 122px; top: 12px; color: var(--ink); opacity: .8; transform: rotate(-12deg); pointer-events: none; }
.postmark svg { width: 52px; height: 34px; margin-right: -4px; }
.pm-ring { width: 84px; height: 84px; border-radius: 50%; border: 3px double currentColor; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.pm-place, .pm-date { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pm-time { font: 800 20px/1.1 Figtree, sans-serif; font-variant-numeric: tabular-nums; }
.pc-lines { grid-area: lines; list-style: none; margin: 0; padding: 0; }
.pc-lines li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; border-bottom: 2px solid var(--line); }
.pc-lines a { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; padding: 6px 0; }
@media (max-width: 359px) { .pc-lines a { font-size: 14.5px; } }
.copy { flex: none; font: 700 13px Figtree, sans-serif; color: var(--ink); background: none; border: 2px solid var(--ink); border-radius: 7px; min-height: 32px; padding: 0 10px; cursor: pointer; }
@media (min-width: 700px) {
  .postcard { padding: 24px 26px; column-gap: 24px; grid-template-columns: minmax(0, 1.1fr) 2px minmax(0, 1fr);
    grid-template-areas: "msg rule stamp" "acts rule lines"; }
  .pc-rule { display: block; }
  .pc-msg { font-size: 19px; }
  .pc-acts { align-self: start; padding-top: 4px; }
  .perf { width: 150px; }
  .pc-stamp { padding-bottom: 4px; }
  .postmark { right: 144px; top: 46px; }
  .postmark svg { width: 64px; height: 40px; }
  .pm-ring { width: 92px; height: 92px; }
  .pm-place, .pm-date { font-size: 10.5px; }
  .pm-time { font-size: 22px; }
}

/* Footer */
footer { margin-top: 64px; color: var(--soft); font-size: 14px; display: grid; gap: 6px; }
footer p { margin: 0; }

/* Terminal: a chat-style command line along the bottom edge */
.term-dock { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 760px; margin: 0 auto; background: rgba(9, 14, 32, .94); color: #e8eef8;
  border: 2px solid #05081a; border-radius: 10px; box-shadow: 6px 6px 0 rgba(5, 8, 26, .45); font: 14px/1.5 var(--mono); }
.term-dock[hidden] { display: none; }
.term-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px 0; color: #9fb0c8; font-size: 12.5px; }
.term-head button { font: inherit; color: inherit; background: none; border: 1px solid #3a4a6b; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.term-out { max-height: min(46vh, 420px); overflow-y: auto; padding: 8px 14px 2px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.term-out .cmd { color: #57e0e6; }
.term-out .err { color: #ff9b8a; }
.term-out.matrix { color: #5be38a; }
.term-form { display: flex; align-items: center; gap: 8px; padding: 4px 14px 12px; }
.term-form label { color: #57e0e6; white-space: nowrap; }
.term-form input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font: inherit; caret-color: #5be38a; padding: 4px 0; }
.term-form input:focus { outline: none; }
.term-dock:focus-within { border-color: #57e0e6; }

/* Command palette */
.palette { position: fixed; inset: 0; z-index: 50; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgba(16, 32, 58, .38); }
.palette[hidden] { display: none; }
.pal { width: min(560px, 100%); background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 8px 8px 0 var(--shade); overflow: hidden; }
.pal input { width: 100%; border: 0; border-bottom: 2px solid var(--line); background: none; padding: 14px 16px; font: 600 17px Figtree, sans-serif; color: var(--ink); }
.pal input:focus { outline: none; }
.pal ul { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 440px); overflow-y: auto; }
.pal .grp { font-size: 13px; font-weight: 700; color: var(--soft); padding: 10px 10px 4px; }
.pal [role="option"] { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.pal [role="option"] .k { margin-left: auto; font-size: 13px; color: var(--soft); }
.pal [role="option"][aria-selected="true"] { background: var(--ink); color: var(--sky); }
.pal [role="option"][aria-selected="true"] .k { color: inherit; }
.pal .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c, var(--line)); flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.pal .empty { padding: 14px 10px; color: var(--soft); }

/* Easter eggs */
body.rolling { animation: roll 1.2s ease-in-out; }
@keyframes roll { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  .proj.flash, body.rolling { animation: none; }
  .item, .mailbox canvas { transition: none; }
  .item:hover, .mailbox:hover canvas { transform: none; }
}
