@font-face {
  font-family: "Cactus Jack";
  src: url("public/fonts/Cactus-Jack.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cactus Jack Alternate";
  src: url("public/fonts/Cactus-Jack-Alternate.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --blue: #001be8;
  --border: #777;
  --ui: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier New", Courier, monospace;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M2 1h3v2h2v2h2v2h2v2h2v2h2v2h2v2h2v3h-6l3 7h-2v2h-3l-4-8-4 4z'/%3E%3Cpath fill='%23fff' d='M4 3h1v2h2v2h2v2h2v2h2v2h2v2H10l4 9h-2l-4-9-4 4z'/%3E%3C/svg%3E") 2 1, default;
  --hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M12 1h5v2h2v7h2V8h4v2h2v2h2v10h-2v4h-2v3H10v-2H8v-3H6v-3H4v-5h2v-2h4v2h2z'/%3E%3Cpath fill='%23fff' d='M14 3h3v12h2v-3h2v4h2v-6h2v7h2v5h-2v4H11v-2H9v-3H7v-4h2l3 4h2z'/%3E%3C/svg%3E") 6 1, pointer;
  --move: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M14 1h4v4h3v2h2v2h-5v5h5V9h2v2h2v3h4v4h-4v3h-2v2h-2v-5h-5v5h5v2h-2v2h-3v4h-4v-4h-3v-2H9v-2h5v-5H9v5H7v-2H5v-3H1v-4h4v-3h2V9h2v5h5V9H9V7h2V5h3z'/%3E%3Cpath fill='%23fff' d='M15 3h2v4h2l-3 3-3-3h2zm0 19h2v4h2l-3 3-3-3h2zM3 15h4v-2l3 3-3 3v-2H3zm19 0h4v-2l3 3-3 3v-2h-4z'/%3E%3C/svg%3E") 16 16, move;
  --text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='32' viewBox='0 0 24 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' stroke='%23fff' stroke-width='3' d='M7 2h10v2h-4v10h3v4h-3v10h4v2H7v-2h4V18H8v-4h3V4H7z'/%3E%3Cpath fill='%23000' d='M7 1h10v3h-4v10h3v4h-3v10h4v3H7v-3h4V18H8v-4h3V4H7zM9 2v1h3v12H9v2h3v12H9v1h6v-1h-3V17h3v-2h-3V3h3V2z'/%3E%3C/svg%3E") 12 16, text;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; }
.photo-sidebar svg, .finder-sidebar svg, .finder-controls svg, .view-buttons svg, .mail-tools svg, .send-button svg, .finder-row .icon svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html, body { margin: 0; min-height: 100%; background: #fff; color: #000; cursor: var(--arrow); }
body { min-width: 320px; font-family: var(--ui); overflow: hidden; }
button, a, input, [contenteditable] { font: inherit; }
button, a, .finder-row, .photo-card { cursor: var(--hand); }
input, [contenteditable] { cursor: var(--text); }
button { border: 0; background: none; color: inherit; padding: 0; }
.ios-only { display: none; }

.status-strip { position: fixed; z-index: 5000; inset: 0 0 auto; height: 30px; display: none; align-items: center; justify-content: space-between; padding: 0 8px; background: #72ff00; color: #071000; font-size: 15px; font-weight: 600; }
.status-strip button { padding: 2px 7px; font-size: 19px; line-height: 1; }
.home-decorated .status-strip { display: flex; }
.home-decorated .site-header { top: 38px; }
.home-decorated .intro { top: 172px; }

.site-header { position: fixed; z-index: 1000; left: 17px; top: 8px; right: 71px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.wordmark { font-weight: 700; font-size: clamp(72px, 6.48vw, 124px); letter-spacing: -0.063em; line-height: .86; white-space: nowrap; pointer-events: auto; transform-origin: left top; will-change: transform; }
.wordmark-tm { display: inline-block; margin-left: .12em; font-size: .16em; letter-spacing: 0; vertical-align: top; transform: translateY(-.05em); }
nav { pointer-events: auto; }
nav ol { margin: 11px 0 0; padding-left: 39px; }
nav li { padding-left: 0; color: var(--blue); font-size: 34px; line-height: 1.18; font-weight: 700; }
nav button { color: var(--blue); font-weight: 700; }
nav button:hover, nav button:focus-visible { text-decoration: underline; }

main { height: 100vh; position: relative; }
.page { position: absolute; inset: 0; visibility: hidden; opacity: 0; pointer-events: none; }
.page.active { visibility: visible; opacity: 1; pointer-events: auto; }

.intro { position: absolute; left: 35px; top: 142px; margin: 0; font: 26px/1.17 var(--mono); letter-spacing: .01em; opacity: var(--home-content-opacity, 1); transition: opacity .08s linear; }
.portrait-excerpt { position: fixed; z-index: 600; left: 35px; bottom: 26px; width: 470px; height: 352px; background: #111 url("public/uploads/teodor-portrait.jpg") center / cover no-repeat; pointer-events: none; will-change: left, bottom, width, height; }
.home-ledger { position: absolute; right: 16px; top: 360px; display: flex; flex-direction: column; align-items: flex-end; font: 18px/1.05 var(--ui); text-align: right; opacity: var(--home-content-opacity, 1); transition: opacity .08s linear; }
.home-ledger button, .home-ledger a { color: #000; text-decoration: none; }
.home-ledger button:hover, .home-ledger a:hover { text-decoration: underline; }
.home-ledger sup { font: 9px var(--mono); vertical-align: top; }
.home-ledger span { margin-top: 7px; font: 10px var(--mono); }
.home-scroll-hint { position: fixed; z-index: 700; right: 18px; bottom: 17px; padding: 6px 8px; background: #fff; color: #000; border: 1px solid #000; font: 12px var(--mono); opacity: var(--home-hint-opacity, 1); pointer-events: none; }
.site-header nav { opacity: var(--home-nav-opacity, 1); transition: opacity .1s linear; }
body.home-immersive .wordmark { color: #fff; mix-blend-mode: difference; }

.window { position: absolute; border: 1px solid rgba(0,0,0,.17); background: rgba(246,246,246,.96); border-radius: 24px; box-shadow: 0 18px 38px rgba(0,0,0,.25); overflow: hidden; min-width: 420px; min-height: 230px; resize: both; }
.window.active-window { box-shadow: 0 22px 48px rgba(0,0,0,.34); }
.window.minimized { height: 46px !important; min-height: 46px; resize: none; }
.window.minimized .window-body { display: none; }
.window.maximized { left: 24px !important; top: 140px !important; width: calc(100vw - 48px) !important; height: calc(100vh - 164px) !important; }
.window-bar { height: 46px; display: flex; align-items: center; background: linear-gradient(#f5f5f5, #e9e9e9); border-bottom: 1px solid #d7d7d7; user-select: none; touch-action: none; }
.drag-handle, .drag-handle:active { cursor: var(--move); }
.traffic-lights { display: flex; gap: 8px; margin-left: 16px; min-width: 148px; }
.traffic-lights button, .traffic-lights i { width: 13px; height: 13px; border-radius: 50%; display: block; }
.traffic-lights .close, .traffic-lights i:nth-child(1) { background: #ff5f57; }
.traffic-lights .minimize, .traffic-lights i:nth-child(2) { background: #febc2e; }
.traffic-lights .maximize, .traffic-lights i:nth-child(3) { background: #28c840; }
.window-title { width: 170px; display: flex; flex-direction: column; font-size: 12px; line-height: 1.05; }
.window-title small { color: #777; }
.window-body { height: calc(100% - 46px); }

.photos-window { z-index: 1; left: 29.35vw; top: 10.65vh; width: 69.1vw; height: 64.8vh; }
.photo-toolbar { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 11px; padding-right: 20px; color: #555; font-size: 12px; }
.photo-toolbar b, .photo-toolbar span { padding: 9px 14px; border-radius: 20px; background: rgba(255,255,255,.62); font-weight: 500; }
.photo-toolbar .selected { background: #cacaca; }
.photos-body { display: flex; }
.photo-sidebar { width: 164px; flex: none; padding: 9px 12px; background: rgba(235,235,235,.93); border-right: 1px solid #d4d4d4; display: flex; flex-direction: column; gap: 2px; }
.photo-sidebar button { display: flex; align-items: center; gap: 7px; text-align: left; padding: 7px 10px; border-radius: 7px; font-size: 13px; }
.photo-sidebar button svg { font-size: 16px; }
.photo-sidebar button.selected { background: #dedede; color: #0878ff; font-weight: 600; }
.photo-sidebar small, .finder-sidebar small { color: #7a7a7a; font-weight: 600; padding: 8px 7px 2px; }
.photo-content { flex: 1; overflow: auto; background: #fff; padding: 20px 17px; }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)); gap: 64px 14px; }
.photo-card { border: 0; padding: 0; min-width: 0; border-radius: 6px; overflow: hidden; background: #e6e6e6; aspect-ratio: 1.34; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); position: relative; }
.photo-card.selected { outline: 3px solid #0a84ff; outline-offset: 2px; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card span { position: absolute; left: 7px; right: 7px; bottom: 5px; padding: 2px 5px; border-radius: 4px; background: rgba(0,0,0,.55); color: white; font-size: 10px; text-align: left; opacity: 0; transition: opacity .15s; }
.photo-card:hover span { opacity: 1; }
.photo-viewer { width: 100%; height: 100%; text-align: center; background: #111; position: relative; overflow: hidden; }
.photo-viewer > button { position: absolute; z-index: 2; left: 16px; top: 12px; display: flex; align-items: center; gap: 3px; padding: 8px 13px 8px 9px; border-radius: 18px; color: #fff; background: rgba(40,40,40,.72); backdrop-filter: blur(12px); }
.photo-viewer > button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.photo-viewer img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-viewer p { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 5px 10px; border-radius: 12px; color: #eee; background: rgba(0,0,0,.55); font-size: 12px; }
.photo-step { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: rgba(45,45,45,.62); backdrop-filter: blur(12px); opacity: 0; transition: opacity .15s; }
.photo-viewer:hover .photo-step, .photo-step:focus-visible { opacity: 1; }
.photo-step.previous { left: 18px; }
.photo-step.next { right: 18px; }
.photo-step svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.photo-step:disabled { display: none; }
.photos-window.viewing-photo .photo-sidebar { display: none; }
.photos-window.viewing-photo .photo-content { padding: 0; overflow: hidden; background: #111; }
.photos-window.viewing-photo .photo-toolbar { visibility: hidden; }
.photos-window.viewing-photo .window-title small { visibility: hidden; }

.finder-window { z-index: 2; left: 2.86vw; top: 42vh; width: 48.2vw; height: 40.6vh; }
.finder-window .window-bar { height: 47px; }
.finder-window .traffic-lights { min-width: 180px; }
.finder-controls { display: flex; align-items: center; width: 100%; gap: 8px; padding-right: 15px; }
.finder-controls > button { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: rgba(255,255,255,.7); font-size: 18px; color: #777; }
.finder-controls strong { margin-left: 4px; font-size: 15px; white-space: nowrap; }
.view-buttons { margin-left: auto; display: flex; gap: 13px; font-size: 18px; color: #555; white-space: nowrap; }
.finder-body { display: flex; }
.finder-sidebar { width: 186px; flex: none; background: rgba(237,237,237,.96); border-right: 1px solid #d7d7d7; padding: 7px 10px; display: flex; flex-direction: column; overflow: auto; }
.finder-sidebar button { display: flex; align-items: center; gap: 7px; text-align: left; padding: 7px 8px; border-radius: 7px; font-size: 13px; white-space: nowrap; }
.finder-sidebar button svg { font-size: 16px; }
.finder-sidebar .selected { color: #0879ff; background: #ddd; }
.finder-content { flex: 1; overflow: auto; background: rgba(255,255,255,.96); font-size: 13px; }
.finder-head, .finder-row { display: grid; grid-template-columns: 1fr 174px 68px 110px; align-items: center; min-width: 630px; }
.finder-head { position: sticky; top: 0; z-index: 2; height: 30px; padding: 0 10px 0 45px; color: #777; background: rgba(255,255,255,.96); border-bottom: 1px solid #ddd; font-size: 11px; }
.finder-head strong { color: #333; }
.finder-row { height: 26px; padding: 0 10px; border-radius: 7px; line-height: 1; }
.finder-row:nth-child(even) { background: #f0f0f0; }
.finder-row:hover { background: #dcecff; }
.finder-row.selected { background: #0a84ff; color: #fff; }
.finder-row.selected .name, .finder-row.selected .meta, .finder-row.selected .icon { color: #fff; }
.finder-row.drop-target { box-shadow: inset 0 0 0 2px #0a84ff; background: #dcecff; }
.finder-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-row .name { display: flex; align-items: center; gap: 5px; min-width: 0; color: #222; text-align: left; }
.finder-row .meta { color: #777; }
.finder-row .icon { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; color: #42a5f5; text-align: center; }
.finder-row .icon svg { width: 16px; height: 16px; }
.finder-sidebar .drop-target { box-shadow: inset 0 0 0 2px #0a84ff; }

.finder-context-menu { position: fixed; z-index: 6000; width: 180px; padding: 5px; border: 1px solid rgba(0,0,0,.18); border-radius: 9px; background: rgba(245,245,245,.96); box-shadow: 0 12px 30px rgba(0,0,0,.26); backdrop-filter: blur(18px); }
.finder-context-menu button { display: block; width: 100%; padding: 6px 10px; border-radius: 5px; text-align: left; font-size: 13px; }
.finder-context-menu button:hover, .finder-context-menu button:focus-visible { background: #0a84ff; color: #fff; }

.preview-window { z-index: 20; left: 20vw; top: 19vh; width: 62vw; height: 68vh; background: #ececec; }
.preview-title { display: flex; flex-direction: column; min-width: 180px; max-width: 34%; font-size: 12px; line-height: 1.05; overflow: hidden; }
.preview-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-title small { color: #777; }
.preview-toolbar { margin-left: auto; padding-right: 16px; display: flex; align-items: center; gap: 9px; color: #555; font-size: 12px; }
.preview-toolbar span { padding: 8px 12px; border-radius: 18px; background: rgba(255,255,255,.72); }
.preview-body { display: grid; place-items: center; overflow: auto; background: #2b2b2b; }
.preview-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-text { align-self: stretch; justify-self: stretch; min-width: 100%; min-height: 100%; margin: 0; padding: 42px; overflow: auto; background: #fff; color: #111; font: 14px/1.55 var(--mono); white-space: pre-wrap; }
.preview-video { max-width: 100%; max-height: 100%; }
.preview-audio { width: min(520px, 80%); }
.preview-generic { min-width: 320px; max-width: 70%; padding: 38px; border-radius: 15px; background: #fff; color: #111; text-align: center; box-shadow: 0 12px 35px rgba(0,0,0,.25); }
.preview-generic strong { display: block; font-size: 22px; overflow-wrap: anywhere; }
.preview-generic p { color: #666; overflow-wrap: anywhere; }
.preview-generic a { display: inline-block; margin-top: 16px; padding: 9px 13px; border-radius: 7px; background: #0a84ff; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }

.projects-table { position: absolute; left: 42vw; top: 17.6vh; width: 56vw; border: 1px solid var(--border); }
.projects-table a, .projects-table button { display: grid; grid-template-columns: 153px 1fr; align-items: center; width: 100%; height: 39px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; text-align: left; overflow: hidden; }
.projects-table > :last-child { border-bottom: 0; }
.projects-table span { padding-left: 13px; font: 26px/1 var(--mono); white-space: nowrap; }
.projects-table em { position: relative; z-index: 1; font-family: "Cactus Jack", "Cactus Jack Alternate", cursive; font-size: 48px; line-height: .72; font-weight: 400; font-style: normal; letter-spacing: .04em; white-space: nowrap; transform-origin: left center; }
.projects-table > :nth-child(1) em { transform: translate(15px, -4px) rotate(-1deg); }
.projects-table > :nth-child(2) em { transform: translate(-21px, -1px) rotate(-2deg); }
.projects-table > :nth-child(3) em { transform: translate(-24px, -1px) rotate(-1deg); }
.projects-table > :nth-child(4) em { transform: translate(110px, -2px) rotate(1deg); }
.projects-table > :nth-child(5) em { transform: translate(21px, -1px) rotate(-1deg); }
.projects-table > :nth-child(6) em { transform: translate(-16px, -1px) rotate(-1deg); }
.projects-table .green { color: #00e845; }.projects-table .red { color: red; }.projects-table .purple { color: #5420ff; }.projects-table .olive { color: #989800; }.projects-table .gray { color: #aaa99e; }.projects-table .blue { color: #0073e6; }

.mail-window { position: absolute; left: 9.55vw; top: 23vh; width: 82.8vw; height: 77vh; border: 1px solid #aaa; border-radius: 56px 56px 0 0; box-shadow: 0 0 50px rgba(0,0,0,.22); overflow: hidden; background: rgba(255,255,255,.97); }
.mail-toolbar { height: 98px; display: flex; align-items: center; border-bottom: 1px solid #d1d1d1; background: #fbfbfb; }
.mail-toolbar .traffic-lights { min-width: 480px; margin-left: 36px; gap: 12px; }
.mail-toolbar .traffic-lights i { width: 27px; height: 27px; }
.mail-tools { display: flex; gap: 18px; align-items: center; }
.mail-tools button { display: grid; place-items: center; min-width: 60px; height: 64px; padding: 0 14px; border-radius: 32px; background: #fff; color: #555; font-size: 31px; }
.mail-tools button svg { width: 34px; height: 34px; }
.mail-tools .type-tool { font-size: 31px; }
.send-button { margin-left: auto; margin-right: 18px; display: grid; place-items: center; width: 69px; height: 69px; border-radius: 50%; background: #0797f5; color: #fff; }
.send-button svg { width: 42px; height: 42px; stroke-width: 1.9; }
.mail-fields label, .from-row { min-height: 76px; display: flex; align-items: center; padding: 0 45px; border-bottom: 1px solid #d1d1d1; color: #888; font-size: 26px; }
.mail-fields label span, .from-row > span:first-child { width: 98px; flex: none; }
.mail-fields input { width: 100%; border: 0; outline: 0; font-size: 27px; background: transparent; }
.mail-fields label:first-child input { width: 327px; flex: none; background: #b7d4f7; border-radius: 4px; padding: 2px 8px; }
.mail-fields label button { margin-left: auto; border-radius: 50%; width: 30px; height: 30px; background: #aaa; font-size: 25px; line-height: 28px; }
.from-row strong { color: #333; font-weight: 400; }
.from-row .signature { margin-left: auto; width: auto; }
.signature b { display: inline-block; color: #333; background: #eee; border-radius: 11px; padding: 10px 20px; min-width: 263px; }
.format-bar { height: 93px; display: flex; align-items: center; gap: 17px; padding: 0 45px; border-bottom: 1px solid #ddd; font-size: 25px; }
.format-bar span { padding: 11px 16px; min-width: 185px; background: #eee; border-radius: 12px; }
.format-bar span:nth-child(3) { min-width: 115px; }
.format-bar > i { width: 46px; height: 46px; border-radius: 12px; background: #000; }
.format-bar button { min-width: 45px; height: 46px; color: #999; font-size: 25px; }
.message-body { height: calc(100% - 497px); padding: 30px 45px; outline: 0; font: 18px/1.5 var(--ui); overflow: auto; }
.mail-scribble { position: absolute; left: -18px; top: -2px; width: 590px; height: 340px; pointer-events: none; overflow: visible; }
.mail-scribble path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mail-scribble .pencil { stroke: rgba(65,65,65,.63); stroke-width: 7; }
.mail-scribble .red-pencil { stroke: rgba(232,0,0,.88); stroke-width: 12; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 3000; transform: translate(-50%, 20px); padding: 11px 17px; background: rgba(0,0,0,.82); color: #fff; border-radius: 20px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.floating-object { position: fixed; z-index: 7; left: 0; top: 0; display: block; filter: drop-shadow(0 5px 4px rgba(0,0,0,.18)); cursor: var(--move); touch-action: none; user-select: none; -webkit-user-drag: none; will-change: transform; }
.floating-object.is-dragging { z-index: 1100; cursor: var(--move); }
.floating-object img { width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; image-rendering: pixelated; }
.floating-disc, .floating-starwars, .floating-earth, .floating-dollar { width: 180px; height: 180px; }
.floating-dollar { width: 180px; height: 198px; }
.floating-earth { border-radius: 50%; overflow: hidden; }

@media (max-width: 1100px) {
  body { overflow: auto; }
  body.home-decorated { padding-top: 30px; }
  .site-header { position: relative; left: auto; top: auto; right: auto; padding: 16px; display: block; }
  .wordmark { white-space: normal; font-size: clamp(54px, 13vw, 110px); }
  nav ol { margin: 24px 0 0; padding-left: 34px; }
  nav li { font-size: clamp(25px, 6vw, 34px); }
  main { height: auto; min-height: calc(100vh - 260px); }
  .page { position: relative; display: none; min-height: 760px; }
  .page.active { display: block; }
  .intro { position: relative; left: auto; top: auto; padding: 30px 16px; font-size: clamp(17px, 3vw, 24px); }
  .portrait-excerpt { position: relative; left: 16px; bottom: auto; margin-top: 80px; max-width: calc(100vw - 32px); }
  .home-scroll-hint { display: none; }
  .home-ledger { display: none; }
  .home-decorated .site-header { top: auto; }
  .home-decorated .intro { top: auto; }
  .archive-page { padding: 24px 12px; }
  .window { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; height: 520px !important; min-width: 0; margin-bottom: 24px; resize: vertical; }
  .photos-window { margin-top: 0; }
  .photo-sidebar { display: none; }
  .photo-grid { grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 13px; }
  .finder-sidebar { display: none; }
  .finder-window .traffic-lights { min-width: 100px; }
  .finder-controls strong { font-size: 12px; }
  .projects-table { position: relative; left: auto; top: auto; width: calc(100% - 24px); margin: 40px 12px 0; }
  .projects-table a, .projects-table button { grid-template-columns: 29% 1fr; min-height: 54px; height: auto; }
  .projects-table span { font-size: clamp(15px, 3vw, 25px); padding: 8px; }
  .projects-table em { font-size: clamp(20px, 5vw, 40px); white-space: normal; padding: 5px; transform: none !important; }
  .contact-page { padding: 20px 12px; }
  .mail-window { position: relative; left: auto; top: auto; width: 100%; height: 720px; border-radius: 28px; }
  .mail-toolbar { height: 70px; }
  .mail-toolbar .traffic-lights { min-width: 125px; margin-left: 20px; }
  .mail-toolbar .traffic-lights i { width: 14px; height: 14px; }
  .mail-tools button { display: none; }
  .mail-tools button:nth-child(-n+2) { display: block; min-width: 45px; height: 45px; font-size: 21px; }
  .send-button { width: 48px; height: 48px; font-size: 32px; line-height: 44px; }
  .mail-fields label, .from-row { min-height: 56px; padding: 0 16px; font-size: 16px; }
  .mail-fields label span, .from-row > span:first-child { width: 65px; }
  .mail-fields input { font-size: 16px; }
  .mail-fields label:first-child input { width: min(245px, calc(100% - 65px)); }
  .from-row .signature { display: none; }
  .format-bar { height: 65px; padding: 0 16px; gap: 8px; overflow: hidden; }
  .format-bar span { min-width: auto; font-size: 15px; }
  .format-bar > :nth-child(n+5) { display: none; }
  .message-body { height: 375px; }
  .mail-scribble { width: 380px; height: 220px; top: 3px; left: -15px; }
}

@media (max-width: 600px) {
  .floating-disc, .floating-starwars, .floating-earth, .floating-dollar { width: 125px; height: 125px; }
  .floating-dollar { width: 125px; height: 138px; }
  .portrait-excerpt { width: calc(100vw - 32px); height: 66vw; background-size: 360vw 202.5vw; background-position: -6.4vw -132vw; }
  .photo-toolbar b, .photo-toolbar span { display: none; }
  .window-title { width: auto; }
  .finder-head, .finder-row { grid-template-columns: 1fr 95px 58px 85px; min-width: 490px; }
  .mail-scribble { width: 330px; }
}

@media (max-width: 600px) {
  .ios-only { display: flex; }

  body[data-current-page="home"] { height: 100svh; padding-top: 0; overflow: hidden; }
  body[data-current-page="archive"], body[data-current-page="contact"] { background: #f2f2f7; }
  body[data-current-page="home"] .site-header { position: fixed; z-index: 1000; left: 0; top: 38px; right: 0; padding: 12px 16px; }
  body[data-current-page="home"]:not(.home-decorated) .site-header { top: 8px; }
  body[data-current-page="home"] .wordmark { font-size: clamp(31px, 8.2vw, 42px); line-height: .92; white-space: nowrap; }
  body[data-current-page="home"] nav ol { margin-top: 19px; }
  body[data-current-page="home"] main, body[data-current-page="home"] .home-page { height: 100svh; min-height: 100svh; }
  body[data-current-page="home"] .intro { position: fixed; z-index: 10; left: 0; top: 188px; width: 100%; margin: 0; padding: 0 16px; font-size: 15px; line-height: 1.2; opacity: var(--home-content-opacity, 1); }
  body[data-current-page="home"] .portrait-excerpt { position: fixed; z-index: 600; max-width: none; margin: 0; background-size: cover; background-position: center; }
  body[data-current-page="home"] .home-scroll-hint { display: block; right: 12px; bottom: 10px; z-index: 700; font-size: 10px; opacity: var(--home-hint-opacity, 1); }

  .archive-page { min-height: 620px; padding: 10px 12px 24px; background: #f2f2f7; }
  .ios-archive-switcher { width: min(280px, calc(100% - 24px)); height: 34px; margin: 2px auto 12px; padding: 2px; border-radius: 9px; background: rgba(118,118,128,.18); }
  .ios-archive-switcher button { flex: 1; border-radius: 7px; color: #3c3c43; font-size: 13px; font-weight: 600; }
  .ios-archive-switcher button.selected { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
  .archive-page[data-ios-app="photos"] .finder-window { display: none !important; }
  .archive-page[data-ios-app="files"] .photos-window { display: none !important; }

  .archive-page .window { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; min-width: 0; min-height: 0; margin: 0; border: 0; border-radius: 14px; box-shadow: 0 1px 12px rgba(0,0,0,.08); resize: none; background: #fff; }
  .archive-page .window:not(.preview-window) .traffic-lights { display: none; }
  .archive-page .window:not(.preview-window) .window-bar { cursor: default; touch-action: auto; }

  .photos-window { display: flex; flex-direction: column; height: min(69svh, 680px) !important; overflow: hidden; }
  .photos-window .window-bar { flex: 0 0 82px; height: 82px; align-items: flex-end; padding: 0 16px 8px; border-bottom: .5px solid rgba(60,60,67,.2); background: rgba(255,255,255,.92); }
  .photos-window .window-title { width: 100%; line-height: 1.15; }
  .photos-window .window-title strong { display: none; }
  .photos-window .window-title::before { content: "Photos"; display: block; color: #000; font-size: 32px; line-height: 1; font-weight: 750; letter-spacing: -.03em; }
  .photos-window .window-title small { margin-top: 5px; color: #6e6e73; font-size: 11px; }
  .photos-window .photo-toolbar { display: none; }
  .photos-window .photos-body { flex: 1; min-height: 0; height: auto; }
  .photos-window .photo-content { padding: 1px 0 0; overflow: auto; background: #fff; }
  .photos-window .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 1px; }
  .photos-window .photo-card { border-radius: 0; aspect-ratio: 1; box-shadow: none; }
  .photos-window .photo-card span { display: none; }
  .photos-window .photo-card.selected { outline: none; }
  .ios-photo-tabbar { flex: 0 0 58px; height: 58px; align-items: center; justify-content: space-around; border-top: .5px solid rgba(60,60,67,.22); background: rgba(249,249,249,.94); color: #8e8e93; }
  .ios-photo-tabbar span { display: flex; min-width: 54px; flex-direction: column; align-items: center; gap: 2px; color: #007aff; font-size: 21px; line-height: 1; }
  .ios-photo-tabbar span:not(:first-child) { color: #8e8e93; }
  .ios-photo-tabbar b { font-size: 9px; font-weight: 500; }
  .photos-window.viewing-photo { height: min(76svh, 720px) !important; }
  .photos-window.viewing-photo .window-bar, .photos-window.viewing-photo .ios-photo-tabbar { display: none; }
  .photos-window.viewing-photo .photos-body { height: 100%; }
  .photo-viewer > button { top: 12px; left: 10px; background: rgba(28,28,30,.72); }
  .photo-step { display: none; }

  .finder-window { display: flex; flex-direction: column; height: min(69svh, 680px) !important; overflow: hidden; }
  .finder-window .window-bar { flex: 0 0 62px; height: 62px; padding: 8px 10px 6px; border-bottom: .5px solid rgba(60,60,67,.18); background: rgba(249,249,249,.94); }
  .finder-controls { position: relative; justify-content: center; padding: 0; }
  .finder-controls > button { position: absolute; left: 0; width: 38px; height: 38px; color: #007aff; background: none; }
  .finder-controls > button:nth-child(2) { display: none; }
  .finder-controls strong { max-width: 68%; margin: 0; overflow: hidden; color: #000; font-size: 17px; font-weight: 700; text-overflow: ellipsis; }
  .finder-controls strong::before { content: "Files · "; }
  .finder-controls .view-buttons { display: none; }
  .finder-body { flex: 1; min-height: 0; height: auto; }
  .finder-content { width: 100%; overflow: auto; background: #fff; }
  .finder-head { display: none; }
  .finder-row { position: relative; grid-template-columns: 1fr; min-width: 0; height: 59px; padding: 0 34px 0 16px; border-bottom: .5px solid rgba(60,60,67,.2); border-radius: 0; background: #fff !important; color: #000; }
  .finder-row::after { content: "›"; position: absolute; right: 14px; top: 50%; color: #c7c7cc; font-size: 27px; font-weight: 300; transform: translateY(-52%); }
  .finder-row .name { gap: 11px; color: #000; font-size: 16px; }
  .finder-row .meta { display: none; }
  .finder-row .icon { width: 30px; height: 30px; flex-basis: 30px; color: #0a84ff; }
  .finder-row .icon svg { width: 28px; height: 28px; }
  .finder-row.selected { background: #e5e5ea !important; color: #000; }
  .ios-files-tabbar { flex: 0 0 58px; height: 58px; align-items: center; justify-content: space-around; border-top: .5px solid rgba(60,60,67,.22); background: rgba(249,249,249,.94); }
  .ios-files-tabbar span { display: flex; min-width: 58px; flex-direction: column; align-items: center; gap: 2px; color: #8e8e93; font-size: 21px; line-height: 1; }
  .ios-files-tabbar span.selected { color: #007aff; }
  .ios-files-tabbar b { font-size: 9px; font-weight: 500; }

  .archive-page .preview-window { position: fixed !important; z-index: 5500 !important; inset: 0 !important; width: 100vw !important; height: 100svh !important; margin: 0; border-radius: 0; background: #111; }
  .preview-window .window-bar { height: 56px; background: rgba(248,248,248,.96); }
  .preview-window .traffic-lights { display: flex; min-width: 52px; margin-left: 4px; }
  .preview-window .traffic-lights .close { display: block; width: 46px; height: 46px; background: transparent; }
  .preview-window .traffic-lights .close::before { content: "‹"; color: #007aff; font-size: 38px; font-weight: 300; line-height: 40px; }
  .preview-window .traffic-lights .minimize, .preview-window .traffic-lights .maximize { display: none; }
  .preview-window .preview-title { flex: 1; max-width: 62%; align-items: center; font-size: 13px; }
  .preview-window .preview-title small, .preview-window .preview-toolbar { display: none; }
  .preview-window .preview-body { height: calc(100% - 56px); }
  .preview-generic { min-width: 0; max-width: calc(100% - 30px); }

  .contact-page { min-height: 740px; padding: 10px 12px 24px; background: #f2f2f7; }
  .mail-window { position: relative; left: auto; top: auto; display: flex; width: 100%; height: min(72svh, 720px); min-height: 590px; flex-direction: column; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 1px 12px rgba(0,0,0,.08); }
  .mail-toolbar { position: relative; order: 1; flex: 0 0 56px; height: 56px; justify-content: space-between; padding: 0 10px; background: rgba(249,249,249,.94); }
  .mail-toolbar .traffic-lights, .mail-tools { display: none; }
  .ios-mail-cancel { align-items: center; width: 64px; color: #007aff; font-size: 16px; text-align: left; }
  .ios-mail-title { position: absolute; left: 50%; top: 50%; font-size: 17px; transform: translate(-50%, -50%); }
  .send-button { width: 34px; height: 34px; margin: 0; border-radius: 50%; }
  .send-button svg { width: 23px; height: 23px; }
  .mail-fields { order: 2; }
  .mail-fields label, .from-row { min-height: 46px; padding: 0 14px; border-bottom: .5px solid rgba(60,60,67,.2); color: #8e8e93; font-size: 16px; }
  .mail-fields label span, .from-row > span:first-child { width: 66px; }
  .mail-fields input { min-width: 0; color: #000; font-size: 16px; }
  .mail-fields label:first-child input { width: calc(100% - 66px); padding: 0; border-radius: 0; background: transparent; }
  .mail-fields label button { width: 24px; height: 24px; color: #fff; font-size: 19px; line-height: 22px; }
  .from-row strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .format-bar { order: 4; flex: 0 0 49px; height: 49px; justify-content: space-around; padding: 0 10px; border-top: .5px solid rgba(60,60,67,.2); border-bottom: 0; background: #f9f9f9; }
  .format-bar span { display: none; }
  .format-bar > i { width: 28px; height: 28px; border-radius: 7px; }
  .format-bar button { display: block !important; min-width: 34px; height: 34px; color: #007aff; font-size: 18px; }
  .message-body { order: 3; flex: 1; height: auto; min-height: 200px; padding: 18px 15px; font-size: 17px; background: #fff; }
  .message-body:empty::before { content: "Write something…"; color: #c7c7cc; pointer-events: none; }
  .mail-scribble { display: none; }
}
