/* Anoushka Dandawate, iOS / macOS Liquid Glass system */
@font-face { font-family: Calhern; src: url("./FTCalhern-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Calhern; src: url("./FTCalhern-RegularItalic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Calhern; src: url("./FTCalhern-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Calhern; src: url("./FTCalhern-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --heading: Calhern, "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Helvetica Neue", Arial, sans-serif;

  --bg: #ffffff;
  --grouped: #f2f2f7;
  --card: #ffffff;
  --card-alt: #f2f2f7;
  --label: #0b1f33;
  --label-2: rgba(11, 31, 51, .68);
  --label-3: rgba(11, 31, 51, .46);
  --separator: rgba(60, 60, 67, .18);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);

  --sky: #b8eaf6;
  --sky-text: #033660;
  --navy: #033660;
  --on-navy-accent: #b8eaf6;
  --accent: #07789a;
  --accent-on-sky: #035e7a;
  --accent-bright: #2ab3d6;
  --on-accent: #ffffff;
  --accent-tint: rgba(42, 179, 214, .18);
  --teal-window: #1e7e97;

  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .84);
  --glass-edge: rgba(255, 255, 255, .78);
  --glass-highlight: rgba(255, 255, 255, .7);
  --glass-shadow: 0 10px 30px rgba(3, 54, 96, .12);
  --shadow-card: 0 1px 2px rgba(3, 54, 96, .06), 0 14px 34px rgba(3, 54, 96, .1);

  --window: #ffffff;
  --window-bar: #f5f5f7;
  --window-side: #e8e8eb;
  --window-edge: rgba(0, 0, 0, .16);
  --window-shadow: 0 30px 70px -22px rgba(3, 54, 96, .5), 0 2px 8px rgba(3, 54, 96, .08);
  --traffic-off: #d4d4d8;
  --curl-1: #ffffff;
  --curl-2: #d9dfe6;
  --book-rec: #033660;
  --icon-filter: brightness(0) saturate(100%);

  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --ease: cubic-bezier(.32, .72, 0, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05080c;
  --grouped: #0d1117;
  --card: #1c1c1e;
  --card-alt: #1c1c1e;
  --label: #f5f7fa;
  --label-2: rgba(235, 235, 245, .7);
  --label-3: rgba(235, 235, 245, .46);
  --separator: rgba(84, 84, 88, .6);
  --fill: rgba(118, 118, 128, .24);
  --fill-2: rgba(118, 118, 128, .36);
  --sky: #0c2735;
  --sky-text: #cdeff8;
  --navy: #021526;
  --on-navy-accent: #8fdcf0;
  --accent: #5ac8fa;
  --accent-on-sky: #64d2ff;
  --accent-bright: #64d2ff;
  --on-accent: #00202e;
  --accent-tint: rgba(100, 210, 255, .18);
  --teal-window: #0f4a5d;
  --glass: rgba(30, 30, 32, .56);
  --glass-strong: rgba(36, 36, 40, .84);
  --glass-edge: rgba(255, 255, 255, .13);
  --glass-highlight: rgba(255, 255, 255, .1);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .06), 0 16px 40px rgba(0, 0, 0, .5);
  --window: #1e1e20;
  --window-bar: #2a2a2d;
  --window-side: #262629;
  --window-edge: rgba(255, 255, 255, .14);
  --window-shadow: 0 30px 70px -18px rgba(0, 0, 0, .75), 0 0 0 .5px rgba(0, 0, 0, .6);
  --traffic-off: #4a4a4e;
  --curl-1: #48484a;
  --curl-2: #2c2c2e;
  --book-rec: #1f5c8a;
  --icon-filter: brightness(0) invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #05080c;
    --grouped: #0d1117;
    --card: #1c1c1e;
    --card-alt: #1c1c1e;
    --label: #f5f7fa;
    --label-2: rgba(235, 235, 245, .7);
    --label-3: rgba(235, 235, 245, .46);
    --separator: rgba(84, 84, 88, .6);
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .36);
    --sky: #0c2735;
    --sky-text: #cdeff8;
    --navy: #021526;
    --on-navy-accent: #8fdcf0;
    --accent: #5ac8fa;
    --accent-on-sky: #64d2ff;
    --accent-bright: #64d2ff;
    --on-accent: #00202e;
    --accent-tint: rgba(100, 210, 255, .18);
    --teal-window: #0f4a5d;
    --glass: rgba(30, 30, 32, .56);
    --glass-strong: rgba(36, 36, 40, .84);
    --glass-edge: rgba(255, 255, 255, .13);
    --glass-highlight: rgba(255, 255, 255, .1);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .06), 0 16px 40px rgba(0, 0, 0, .5);
    --window: #1e1e20;
    --window-bar: #2a2a2d;
    --window-side: #262629;
    --window-edge: rgba(255, 255, 255, .14);
    --window-shadow: 0 30px 70px -18px rgba(0, 0, 0, .75), 0 0 0 .5px rgba(0, 0, 0, .6);
    --traffic-off: #4a4a4e;
    --curl-1: #48484a;
    --curl-2: #2c2c2e;
    --book-rec: #1f5c8a;
    --icon-filter: brightness(0) invert(1);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--label); background: var(--bg); font: 17px/1.55 var(--body); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 12px; }
::selection { background: var(--accent-bright); color: #fff; }
.wrap { width: min(88%, 1280px); margin-inline: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--heading); font-weight: 500; line-height: 1.05; }
h1 { font-size: clamp(48px, 5.6vw, 84px); letter-spacing: -.035em; }
h2 { font-size: clamp(36px, 3.6vw, 52px); letter-spacing: -.025em; }
h3 { font-size: 30px; letter-spacing: -.02em; }
h4 { font-size: 24px; letter-spacing: -.01em; }
strong, b { font-weight: 600; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label-2); }
.blue { color: var(--accent); }
.muted { color: var(--label-2); }
[hidden] { display: none !important; }
.skip { position: absolute; top: -80px; left: 16px; z-index: 40; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.skip:focus { top: 12px; }

/* Liquid Glass material */
.nav, .hero-dock, .tool-group, .sticker, .read-time, .dock-tip {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav, .hero-dock, .tool-group, .sticker, .read-time, .dock-tip { background: var(--glass-strong); }
}

/* Full-bleed bands without extra markup */
.surface { position: relative; isolation: isolate; }
.surface::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--band, transparent); transition: background .3s; }

/* ---------- Buttons & chips ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--fill); color: var(--label); font-size: 16px; font-weight: 600; letter-spacing: -.01em; transition: transform .35s var(--ease), background .2s, filter .2s; }
.button:hover { background: var(--fill-2); }
.button:active { transform: scale(.96); }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.08); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 13px; border-radius: 999px; background: var(--fill); color: var(--label); font-size: 13px; font-weight: 500; line-height: 1.3; }
.text-button { width: 100%; min-height: 50px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 600; transition: transform .35s var(--ease), filter .2s; }
.text-button:hover { filter: brightness(1.08); }
.text-button:active { transform: scale(.97); }

/* ---------- Navigation ---------- */
.nav-shell { position: sticky; top: 12px; z-index: 20; height: 64px; margin-bottom: -64px; pointer-events: none; }
.nav { position: relative; pointer-events: auto; max-width: 1180px; height: 64px; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 22px; border-radius: 999px; }
.logo { margin-right: auto; font: 500 30px/1 var(--heading); letter-spacing: -.05em; }
.star-mark { display: inline-block; width: .62em; height: .62em; margin-left: .06em; vertical-align: .02em; pointer-events: none; }
.logo .star-mark { width: 21px; height: 21px; margin-left: 2px; vertical-align: -1px; }
.footer-brand .star-mark { width: 28px; height: 28px; }
.cover-title .star-mark { width: .56em; height: .56em; margin-left: .08em; filter: brightness(0) invert(1); }
.menu-toggle { display: none; }
.nav-tabs { display: flex; align-items: center; gap: 2px; }
.nav-tabs a { min-height: 44px; display: grid; place-items: center; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; transition: background .25s var(--ease), color .25s; }
.nav-tabs a:hover { background: var(--fill); }
.nav-tabs a[aria-current] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.theme-toggle { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; transition: background .2s; }
.theme-toggle:hover { background: var(--fill); }
.theme-toggle .icon-sun, .theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }

/* ---------- Hero: macOS windows ---------- */
.hero { --band: radial-gradient(1100px 520px at 72% 0%, rgba(255, 255, 255, .5), transparent 62%), var(--sky); --accent: var(--accent-on-sky); padding: 100px 0 36px; }
.desktop { --offset: 64px; --win-w: 60%; --win-h: auto; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--offset) var(--win-h) var(--offset); }
.desktop > .mac-window { grid-column: 1; align-self: stretch; width: var(--win-w); z-index: 1; transform-origin: 50% 0; }
.window-id { grid-row: 1 / 3; justify-self: end; }
.window-photo { grid-row: 2 / 4; justify-self: start; }
.desktop > .mac-window.is-front { z-index: 2; }
.mac-window:not(.is-front) { cursor: pointer; }
.mac-window:not(.is-front) .traffic i { background: var(--traffic-off); }
.mac-window { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 16px; background: var(--window); color: var(--label); box-shadow: 0 0 0 .5px var(--window-edge), var(--window-shadow); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.window-bar { flex: 0 0 auto; min-height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--window-bar); border-bottom: 1px solid var(--separator); }
.traffic { display: flex; gap: 8px; }
.traffic i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); transition: background .25s; }
.traffic i:nth-child(2) { background: #febc2e; }
.traffic i:nth-child(3) { background: #28c840; }
.window-title { display: grid; font-size: 13px; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.window-title small { font-size: 11px; font-weight: 400; color: var(--label-3); }
.window-tools { display: flex; gap: 14px; margin-left: auto; color: var(--label-2); }
.window-body { flex: 1 1 auto; min-height: 0; }

.photo-body { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.portrait-slot { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; background: var(--window-side); color: var(--label-3); border-right: 1px solid var(--separator); }
.portrait-slot > span:first-child { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.portrait-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sticker { position: absolute; z-index: 1; padding: 7px 13px; border-radius: 999px; color: var(--label); font-size: 12px; font-weight: 600; white-space: nowrap; }
.sticker.one { top: 16px; left: 16px; transform: rotate(-3deg); }
.sticker.two { right: 16px; bottom: 18px; border-color: transparent; background: var(--accent); color: var(--on-accent); transform: rotate(3deg); }
.hero-card-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 2.8vw, 40px); }
.name-tag { font: 500 clamp(24px, 2.2vw, 32px)/1.1 var(--heading); letter-spacing: -.02em; }
.name-tag small { display: block; margin-top: 6px; color: var(--label-2); font: 400 14px/1.4 var(--body); letter-spacing: 0; }
.hero h1 { margin-top: 16px; font-size: clamp(38px, 3.4vw, 52px); line-height: .95; letter-spacing: -.04em; }
.hero h1 span { color: var(--accent); }
.window-photo h1 span { background: linear-gradient(95deg, #07789a, #2ab3d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .window-photo h1 span { background-image: linear-gradient(95deg, #5ac8fa, #9be7ff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .window-photo h1 span { background-image: linear-gradient(95deg, #5ac8fa, #9be7ff); } }
.window-photo { --accent: #07789a; }
:root[data-theme="dark"] .window-photo { --accent: #5ac8fa; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .window-photo { --accent: #5ac8fa; } }
.hero-meta { margin: 14px 0 0; color: var(--label-3); font-size: 13px; }

.id-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "left right" "bottom right"; gap: 16px 22px; padding: 20px 22px; background: var(--teal-window); color: #fff; }
.id-left, .id-right { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.id-left { grid-area: left; }
.id-right { grid-area: right; }
.id-profile { display: flex; align-items: center; gap: 16px; }
.memoji-slot { flex: 0 0 72px; width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 32% 26%, #ffffff, #cdeff8); color: #033660; font: 500 30px/1 var(--heading); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 10px 22px rgba(0, 0, 0, .2); }
.memoji-slot img { width: 100%; height: 100%; object-fit: cover; }
.id-profile h3 { font-size: clamp(22px, 2vw, 30px); color: #fff; }
.id-profile p { margin: 4px 0 0; color: rgba(255, 255, 255, .8); font-size: 13px; }
.id-blurb { margin: 0; color: rgba(255, 255, 255, .92); font-size: 14px; line-height: 1.5; }
.id-quote { margin: 0; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .13); color: #fff; font: 400 20px/1.25 var(--heading); }
.id-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; overflow: hidden; border-radius: 14px; background: rgba(255, 255, 255, .2); }
.id-details div { padding: 7px 11px; background: var(--teal-window); background-image: linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .08)); }
.id-details dt { color: rgba(255, 255, 255, .72); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.id-details dd { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }
.id-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.id-categories span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 500; }
.id-socials { display: flex; flex-wrap: wrap; gap: 6px; }
.id-socials a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; background: #fff; color: #033660; font-size: 12px; font-weight: 600; transition: transform .3s var(--ease); }
.id-socials a:hover { transform: translateY(-2px); }
.id-socials img { width: 14px; height: 14px; object-fit: contain; }
.id-resume { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border: 1px dashed rgba(255, 255, 255, .5); border-radius: 999px; background: transparent; color: #fff; font-size: 14px; font-weight: 600; text-align: left; cursor: default; }
.id-resume small { font-size: 12px; font-weight: 400; opacity: .72; }
.id-bottom { grid-area: bottom; align-self: end; display: grid; justify-items: start; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .78); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.id-bottom div { display: flex; flex-wrap: wrap; gap: 6px; }
.id-bottom b { padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #033660; font-size: 12px; letter-spacing: 0; text-transform: none; }

@media (min-width: 1024px) {
  .mac-window:not(.is-front) { transform: scale(.975); }
  .window-photo .photo-body { grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); }
  .hero-dock { margin-top: 20px; }
}
@media (max-width: 1023px) {
  .desktop { --offset: 44px; --win-w: 92%; }
  .mac-window:not(.is-front) { transform: scale(.97); }
}

/* Dock */
.hero-dock { position: relative; z-index: 3; width: max-content; max-width: 100%; display: flex; align-items: flex-end; gap: 10px; margin: 36px auto 0; padding: 10px 12px; border-radius: 26px; }
.dock-app { position: relative; width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: var(--app); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 10px rgba(3, 54, 96, .2); transform-origin: 50% 100%; transition: transform .35s var(--ease); }
.dock-app:hover, .dock-app:focus-visible { transform: translateY(-8px) scale(1.14); }
.dock-app svg { width: 28px; height: 28px; }
.dock-app img { width: 26px; height: 26px; }
.dock-app img.invert { filter: brightness(0) invert(1); }
.dock-tip { position: absolute; bottom: calc(100% + 10px); left: 50%; padding: 4px 10px; border-radius: 8px; color: var(--label); font-size: 12px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .15s; }
.dock-app:hover .dock-tip, .dock-app:focus-visible .dock-tip { opacity: 1; }
.dock-divider { align-self: stretch; width: 1px; margin: 6px 4px; background: var(--separator); }

/* ---------- Ribbons ---------- */
.ribbon { overflow: hidden; padding: 18px 0; background: #fff; color: #033660; border-block: 1px solid rgba(3, 54, 96, .1); }
.ribbon-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.ribbon-track { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.ribbon-group { display: flex; flex-shrink: 0; align-items: center; }
.ribbon-group span { display: flex; flex-shrink: 0; align-items: center; white-space: nowrap; }
.ribbon-group span::after { content: ""; width: 14px; height: 14px; margin: 0 30px; background: url("./star.svg") center / contain no-repeat; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.section-head h2 { margin-top: 10px; }
.section-head p { max-width: 360px; margin: 0; color: var(--label-2); }
.section-cta { display: flex; justify-content: center; margin-top: 44px; }

/* Featured work: navy band */
#work { --band: var(--navy); color: #fff; }
#explorations { --band: var(--grouped); }
#work .eyebrow { color: var(--on-navy-accent); }
#work .section-head p { color: rgba(255, 255, 255, .72); }
#work .section-cta .button.primary { background: #fff; color: #033660; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.project { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 10px 10px 18px; overflow: hidden; border-radius: 24px; background: var(--card); color: var(--label); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .5); cursor: pointer; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.project:hover { transform: translateY(-4px); }
.work-grid .project { background: var(--card-alt); box-shadow: none; }
.cover { position: relative; width: 100%; aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; overflow: hidden; border: 0; border-radius: 16px; background: var(--card-alt); color: var(--label); text-align: center; cursor: inherit; }
.cover-title { position: relative; z-index: 1; font: 500 clamp(28px, 2.6vw, 42px)/1.02 var(--heading); letter-spacing: -.04em; }
.read-time { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 4px 10px; border-radius: 999px; color: var(--label); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cover.glow { background: linear-gradient(145deg, #5ed0f0, #1e7e97); color: #fff; }
.orbit { position: absolute; right: -50px; bottom: -70px; width: 220px; height: 220px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; }
.orbit::after { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; }
.cover.ayojak { background: linear-gradient(160deg, #0a4775, #033660); color: #fff; }
.dashboard { display: flex; gap: 8px; width: 72%; height: 56px; margin-top: 22px; }
.dashboard i { flex: 1; border-radius: 10px; background: rgba(255, 255, 255, .12); }
.dashboard i:nth-child(2) { flex: 2; background: rgba(94, 208, 240, .38); }
.search-line { min-width: 72%; margin-top: 20px; padding: 10px 18px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-card); color: var(--label-2); font-size: 13px; text-align: left; }
.cover.reloom { background: var(--sky); color: var(--sky-text); }
.reloop { font-size: 52px; line-height: 1; }
.orbit { width: 160px; height: 160px; right: -40px; bottom: -56px; }
.dashboard { position: absolute; bottom: 18px; width: 64%; height: 30px; margin: 0; }
.dashboard i { border-radius: 7px; }
.search-line { position: absolute; bottom: 18px; min-width: 0; width: 72%; margin: 0; padding: 7px 14px; font-size: 11px; }
.reloop { position: absolute; bottom: 12px; font-size: 32px; }
.cover.tribes { background: linear-gradient(150deg, #ffb46b, #d0573e); color: #fff; }
.weave { position: absolute; right: 0; bottom: 0; left: 0; height: 26%; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 10px, transparent 10px 20px), repeating-linear-gradient(45deg, rgba(90, 30, 10, .18) 0 10px, transparent 10px 20px); }
.cover.seva { background: linear-gradient(150deg, #2ab3d6, #07789a); color: #fff; }
.seva-grid { position: absolute; bottom: 16px; display: grid; grid-template-columns: repeat(4, 22px); gap: 6px; }
.seva-grid i { height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .28); }
.seva-grid i:nth-child(2) { background: rgba(255, 255, 255, .7); }
.cover.emrys { background: radial-gradient(300px 200px at 90% 0%, rgba(94, 208, 240, .35), transparent 60%), linear-gradient(150deg, #0a4775, #033660); color: #fff; }
.cover.innerwear { background: linear-gradient(150deg, #8e9bff, #5b5be8); color: #fff; }
.project-body { display: grid; gap: 4px; padding: 14px 8px 0; }
.project-q { font: 500 20px/1.2 var(--heading); letter-spacing: -.015em; }
.project .project-name, .project-name { display: block; margin: 2px 0 0; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.project .tags { gap: 6px; margin-top: 8px; }
.project .tags span { padding: 4px 10px; font-size: 12px; }
.work-grid { padding-block: 32px 96px; }

/* Playground */
.playground > .section { --band: var(--bg); }
.playground-flow { min-width: 0; display: grid; gap: 64px; }
.process-board { min-width: 0; padding: 36px; overflow: hidden; border-radius: var(--r-xl); background-color: var(--sky); background-image: radial-gradient(circle, rgba(3, 54, 96, .16) 1px, transparent 1.5px); background-size: 22px 22px; color: var(--sky-text); }
.process-board h3 { margin-top: 10px; font-size: 38px; }
.process-board .eyebrow { color: inherit; opacity: .75; }
.process-board p { margin: 10px 0 0; opacity: .8; }
.canvas { position: relative; min-height: 240px; margin: 22px 0; overflow: hidden; border-radius: 24px; background: rgba(255, 255, 255, .38); border: 1px solid rgba(255, 255, 255, .6); touch-action: none; }
:root[data-theme="dark"] .canvas { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .canvas { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .08); } }
.tile { position: absolute; left: var(--x); top: var(--y); min-width: 140px; min-height: 66px; padding: 12px 18px; border: 0; border-radius: 20px; background: var(--card); color: var(--label); box-shadow: 0 10px 24px rgba(3, 54, 96, .18); font: 500 22px var(--heading); text-align: left; cursor: grab; user-select: none; touch-action: none; transform: rotate(var(--r)); transition: transform .4s var(--ease), box-shadow .3s; }
.tile small { display: block; margin-bottom: 2px; font: 600 11px var(--body); letter-spacing: .08em; opacity: .7; }
.tile:nth-child(1), .tile:nth-child(5) { background: linear-gradient(150deg, #2ab3d6, #07789a); color: #fff; }
.tile:nth-child(2), .tile:nth-child(6) { background: linear-gradient(150deg, #0a4775, #033660); color: #fff; }
.tile:nth-child(3) { background: linear-gradient(150deg, #ff6b81, #e8364f); color: #fff; }
.tile:active { cursor: grabbing; box-shadow: 0 16px 34px rgba(3, 54, 96, .26); }
.canvas.ordered { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 20px; }
.canvas.ordered .tile { position: static; transform: none; }
.process-board .button { background: var(--card); color: var(--label); box-shadow: var(--shadow-card); }
.toolkit-block { min-width: 0; margin-top: 36px; padding-top: 30px; border-top: 1px solid rgba(3, 54, 96, .14); }
.toolkit-block h4 { font-size: 26px; }
.process-board .toolkit-block p { margin-top: 6px; }
.process-board .tool-group { background: rgba(255, 255, 255, .5); }
.dock-scroll { --base: 64px; margin-top: 0; padding: 64px 0 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.dock-scroll::-webkit-scrollbar { display: none; }
.tool-dock { width: max-content; margin-inline: auto; }
.tool-group[aria-hidden="true"] { display: none; }
.tool-group { height: calc(var(--base) + 22px); display: flex; align-items: flex-end; gap: 6px; padding: 0 12px 11px; border-radius: 28px; }
.dock-item { --s: 1; position: relative; width: calc(var(--base) * var(--s)); display: grid; justify-items: center; align-content: end; transition: width .16s ease-out; }
.dock-icon { width: calc(var(--base) * var(--s)); height: calc(var(--base) * var(--s)); display: grid; place-items: center; border-radius: 23%; background: #fff; box-shadow: 0 4px 12px rgba(3, 54, 96, .14), inset 0 0 0 .5px rgba(0, 0, 0, .08); transition: width .16s ease-out, height .16s ease-out; }
.dock-icon img { width: 62%; height: 62%; object-fit: contain; }
.dock-item > span:not(.dock-icon) { position: absolute; bottom: calc(100% + 12px); left: 50%; padding: 4px 10px; border: 1px solid var(--glass-edge); border-radius: 8px; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--glass-shadow); color: var(--label); font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .12s; }
.dock-item:hover > span:not(.dock-icon) { opacity: 1; }
@media (hover: none) {
  .dock-scroll { padding-top: 8px; }
  .tool-group { height: auto; gap: 12px; padding: 12px 14px; }
  .dock-item > span:not(.dock-icon) { position: static; margin-top: 6px; padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--label-2); font-size: 11px; opacity: 1; transform: none; }
}

/* About on home: sky band */
.section-stack { display: block; }
#about { --band: var(--sky); --accent: var(--accent-on-sky); }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; }
.about-grid h2 { margin-top: 12px; }
.about-grid p { color: var(--label-2); }
.about-grid p.blue { color: var(--accent); font-weight: 600; }
.about-grid > div { min-width: 0; }
.traits-marquee { margin: 0 0 28px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.traits { width: max-content; display: flex; padding-block: 4px; animation: marquee 28s linear infinite; }
.traits-marquee:hover .traits { animation-play-state: paused; }
.trait-group { display: flex; gap: 12px; padding-right: 12px; }
.trait { width: 250px; flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 14px; border-radius: 22px; background: var(--card-alt); }
.trait-memoji { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(160deg, #f2fbfd, #b8eaf6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); font-size: 32px; line-height: 1; }
#about .trait, #about .tags span { background: var(--glass-strong); box-shadow: 0 1px 0 var(--glass-highlight) inset; }
.trait b { font: 500 21px/1.15 var(--heading); letter-spacing: -.01em; }
.trait p { margin: 2px 0 0; font-size: 14px; }
.interests { margin-top: 14px; }
.experience { width: 100vw; max-width: 100vw; margin: 88px 0 0 calc(50% - 50vw); padding: 0 max(6vw, calc((100vw - 1280px) / 2)); }
.experience h3 { margin: 0 0 22px; font-size: clamp(34px, 3.6vw, 52px); }
.experience-list { overflow: hidden; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card); }
.experience-row { position: relative; display: grid; grid-template-columns: minmax(0, 32%) minmax(0, 1fr) 40px; gap: clamp(20px, 4vw, 56px); align-items: center; padding: 26px 28px; }
.experience-row + .experience-row::before { content: ""; position: absolute; top: 0; left: 28px; right: 0; height: 1px; background: var(--separator); }
.experience-meta { display: grid; gap: 2px; align-self: start; min-width: 0; }
.experience-orgline { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.experience-orgline strong { font: 500 clamp(22px, 1.9vw, 28px)/1.1 var(--heading); }
.experience-logo { width: 48px; height: 48px; flex: 0 0 48px; padding: 6px; border-radius: 12px; background: #fff; object-fit: contain; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.logo-placeholder { display: grid; place-items: center; padding: 0; background: var(--accent-tint); color: var(--accent); font-size: 13px; font-weight: 700; box-shadow: none; }
.experience-meta time, .experience-meta > span { color: var(--label-2); font-size: 15px; }
.experience-summary { min-width: 0; }
.experience-summary p { margin: 0; color: var(--label); font-size: 16px; line-height: 1.5; }
.experience-detail { max-height: 0; margin-top: 0 !important; overflow: hidden; opacity: 0; color: var(--label-2) !important; transition: max-height .4s var(--ease), opacity .3s, margin .4s var(--ease); }
.experience-row.expanded .experience-detail { max-height: 160px; margin-top: 10px !important; opacity: 1; }
.experience-toggle { position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--label-2); transition: background .2s, color .2s; }
.experience-toggle span { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease); }
.experience-toggle span:last-child { transform: rotate(90deg); }
.experience-toggle[aria-expanded="true"] span:last-child { transform: rotate(0); }
.experience-toggle:hover { background: var(--fill-2); color: var(--accent); }

/* Side quest & explorations */
.section-stack > .section:nth-child(2) { --band: var(--bg); }
.section-stack > .section:nth-child(3) { --band: var(--grouped); }
.sidequest { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
.sidequest h2 { margin: 10px 0 14px; }
.sidequest p { color: var(--label-2); }
.sidequest .tags { margin-top: 22px; }
.emrys-art { min-height: 360px; display: flex; flex-direction: column; justify-content: center; padding: 44px; border-radius: var(--r-xl); background: radial-gradient(500px 300px at 90% 0%, rgba(94, 208, 240, .35), transparent 60%), linear-gradient(150deg, #0a4775, #033660 60%, #021f38); color: #fff; box-shadow: var(--shadow-card); }
.emrys-art strong { font: 500 68px/1 var(--heading); letter-spacing: -.035em; }
.emrys-art span { margin-top: 18px; color: #b8eaf6; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.small-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.small-card { padding: 28px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card); }
.small-card h3 { margin: 12px 0 10px; font-size: 28px; }
.small-card p { color: var(--label-2); }
.section-head .cut-sub { max-width: 540px; margin: 12px 0 0; }
.cut-nav { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.cut-arrow { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--label); box-shadow: var(--shadow-card); transition: transform .3s var(--ease); }
.cut-arrow:active { transform: scale(.9); }
.cut-nav .button { background: var(--card); box-shadow: var(--shadow-card); }
.cut-scroll { margin-inline: calc(50% - 50vw); padding: 8px calc(50vw - 50%) 36px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: calc(50vw - 50%); scrollbar-width: none; overscroll-behavior-x: contain; }
.cut-scroll::-webkit-scrollbar { display: none; }
.cut-row { width: max-content; display: flex; gap: 20px; }
.cut-row .small-card { width: min(400px, 80vw); flex: 0 0 auto; display: flex; flex-direction: column; scroll-snap-align: start; transition: transform .4s var(--ease); }
.cut-row .small-card:hover { transform: translateY(-4px); }
.cut-row .small-card .tags { margin-top: auto; padding-top: 16px; }
.cut-row .see-all { background: radial-gradient(400px 260px at 100% 0%, rgba(94, 208, 240, .32), transparent 60%), linear-gradient(150deg, #0a4775, #033660); color: #fff; }
.see-all .eyebrow, .see-all-link { color: #b8eaf6; }
.cut-row .see-all p { color: rgba(255, 255, 255, .76); }
.see-all-link { margin-top: auto; padding-top: 16px; font-weight: 600; }
@media (max-width: 1023px) { .cut-nav { margin-top: 20px; } }
@media (hover: none) { .cut-arrow { display: none; } }

/* Reading library */
.reading-library { margin-top: 24px; padding-top: 56px; border-top: 1px solid var(--separator); }
.library-head h3 { margin-top: 10px; font-size: 46px; }
.library-head p { max-width: 560px; margin: 12px 0 0; color: var(--label-2); }
.bookshelf { --shelf-pad: max(6vw, calc((100vw - 1280px) / 2)); position: relative; left: 50%; width: 100vw; max-width: 100vw; margin: 36px 0 0 -50vw; padding: 46px 0 0; overflow-x: auto; overflow-y: hidden; cursor: grab; scrollbar-width: none; touch-action: pan-x; }
.shelf-inner { width: max-content; min-width: 100%; padding-inline: var(--shelf-pad); }
.bookshelf::-webkit-scrollbar { display: none; }
.bookshelf:active { cursor: grabbing; }
.book-row { height: 250px; display: flex; align-items: flex-end; gap: 24px; }
.book { position: relative; width: var(--book-width); height: var(--book-height); flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: #fff; text-align: left; transform-origin: 50% 100%; transition: transform .45s var(--ease); }
.book:hover, .book:focus-visible { transform: translateY(-8px); }
.book.selected { z-index: 2; transform: translateY(-14px) scale(1.06); }
.book-cover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 14px 14px 22px; overflow: hidden; border-radius: 3px 8px 8px 3px; background: var(--cover, linear-gradient(160deg, #2ab3d6, #07789a)); box-shadow: 0 1px 1px rgba(0, 0, 0, .12), 0 12px 20px -8px rgba(0, 0, 0, .35), 0 26px 30px -20px rgba(0, 0, 0, .35); }
.book-cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .22) 40%, rgba(0, 0, 0, .1) 70%, transparent); }
.book-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255, 255, 255, .24), transparent 40%); pointer-events: none; }
.book-title { position: relative; font: 500 18px/1.1 var(--heading); letter-spacing: -.01em; }
.book-title::after { content: ""; display: block; width: 26px; height: 2px; margin-top: 10px; border-radius: 2px; background: currentColor; opacity: .5; }
.book-cover small { position: relative; font-size: 10px; font-weight: 600; letter-spacing: .06em; line-height: 1.3; text-transform: uppercase; opacity: .82; }
.book.selected .book-cover { box-shadow: 0 0 0 3px var(--accent-bright), 0 18px 30px -10px rgba(0, 0, 0, .4); }
.book-cobalt { --cover: linear-gradient(160deg, #0a4775, #033660); }
.book-sky { --cover: linear-gradient(160deg, #e6f8fc, #b8eaf6); color: #033660; }
.book-indigo { --cover: linear-gradient(160deg, #7a86ff, #4349c9); }
.book-teal { --cover: linear-gradient(160deg, #3fcfae, #118a72); }
.book-red { --cover: linear-gradient(160deg, #ff7f8e, #dd3a4f); }
.book-ink { --cover: linear-gradient(160deg, #3a3a3c, #111114); }
.shelf-edge { position: relative; height: 18px; margin-inline: calc(var(--shelf-pad) * -1); border-radius: 0; background: var(--card); box-shadow: 0 1px 0 var(--separator), 0 12px 24px rgba(3, 54, 96, .14); }
.reading-detail { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 28px; padding: 24px 28px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-card); }
.reading-detail:empty { display: none; }
.reading-detail h4 { margin-top: 8px; font-size: 28px; }
.reading-detail p { max-width: 650px; margin: 8px 0 0; color: var(--label-2); }
.library-pending { color: var(--label-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; padding: 96px 0 28px; background: radial-gradient(900px 420px at 88% 0%, rgba(94, 208, 240, .22), transparent 62%), var(--navy); color: #fff; }


.footer .eyebrow { color: var(--on-navy-accent); }
.footer h2 { font-size: clamp(64px, 9vw, 136px); line-height: .9; letter-spacing: -.045em; }
.footer p { max-width: 620px; color: rgba(255, 255, 255, .72); font-size: 17px; }
.footer-kicker-row, .footer-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-letters { display: flex; flex: 1 1 auto; flex-wrap: wrap; column-gap: .22em; padding: 14px 0 22px; cursor: none; user-select: none; }
.footer-word { display: inline-flex; white-space: nowrap; }
.footer-letter, .footer-brand-part { display: inline-block; touch-action: none; cursor: none; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0deg)); transition: transform .3s var(--ease), color .2s; }
.footer-letter:hover, .footer-brand-part:hover { color: var(--on-navy-accent); }
.footer-letter.dragging, .footer-brand-part.dragging { z-index: 2; transition: none; }
.footer-brand { display: inline-flex; align-items: center; gap: 1px; flex: 0 0 auto; font: 500 42px var(--heading); letter-spacing: -.05em; user-select: none; }
.footer-brand-part.mark-star { margin-left: 4px; }
.footer-selection { position: absolute; z-index: 5; top: 0; left: 0; width: 0; height: 0; border: 1.5px solid #5ed0f0; border-radius: 4px; opacity: 0; pointer-events: none; transition: left .08s, top .08s, width .08s, height .08s, opacity .12s; }
.footer-selection.visible { opacity: 1; }
.footer-selection::before { content: ""; position: absolute; top: -4px; left: -4px; width: 6px; height: 6px; border-radius: 2px; background: #fff; box-shadow: calc(var(--selection-width, 0px) - 2px) 0 #fff, 0 calc(var(--selection-height, 0px) - 2px) #fff, calc(var(--selection-width, 0px) - 2px) calc(var(--selection-height, 0px) - 2px) #fff; }
.footer-selection::after { content: "MOVE"; position: absolute; top: -20px; left: -1px; padding: 3px 6px; border-radius: 5px; background: #5ed0f0; color: #033660; font: 700 8px/1 var(--body); letter-spacing: .06em; }
.letter-hint { display: block; margin-bottom: 20px; color: rgba(255, 255, 255, .55); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.socials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 36px 0 56px; }
.socials a { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; font-weight: 600; transition: background .25s, color .25s, transform .35s var(--ease); }
.socials a img { width: 21px; height: 21px; object-fit: contain; filter: brightness(0) invert(1); }
.socials a span { margin-left: auto; }
.socials a:hover { background: #fff; color: #033660; transform: translateY(-3px); }
.socials a:hover img { filter: brightness(0); }
.footnote { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .6); font-size: 13px; }

/* ---------- Sheet dialog ---------- */
dialog { width: min(760px, 94vw); max-height: 86vh; overflow: auto; padding: 44px 40px 36px; border: 0; border-radius: 32px; background: var(--card); color: var(--label); box-shadow: 0 40px 90px rgba(0, 0, 0, .35); }
dialog::before { content: ""; display: block; width: 40px; height: 5px; margin: -28px auto 22px; border-radius: 3px; background: var(--fill-2); }
dialog::backdrop { background: rgba(3, 20, 36, .42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
dialog .close { float: right; min-height: 36px; padding: 0 16px; font-size: 14px; }
dialog h2 { margin: 14px 0 10px; font-size: 44px; }
dialog h3 { margin-top: 28px; font-size: 24px; }
dialog p, dialog li { color: var(--label-2); }
dialog li { margin: 8px 0; }
dialog .placeholder { padding: 12px 16px; border-radius: 14px; background: var(--fill); font-size: 13px; }

/* ---------- Work & About pages ---------- */
.page-main { min-height: 70vh; }
.page-hero { --accent: var(--accent-on-sky); padding: 112px 0 8px; background: var(--bg); }
.page-hero h1 { max-width: 960px; margin-top: 8px; font-size: clamp(36px, 3.8vw, 54px); line-height: 1; letter-spacing: -.035em; }
.page-hero h1 span { color: var(--accent); }
.page-intro { max-width: 620px; margin: 12px 0 0; color: var(--label-2); font-size: 16px; }


/* ---------- Motion ---------- */
.reveal { animation: arrive .8s var(--ease) both; }
.hero-dock.reveal { animation-delay: .15s; }
@keyframes arrive { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes toolkit-marquee { to { transform: translateX(-50%); } }
@keyframes ribbon-word-wave { 0%, 100% { transform: translateY(-4px) rotate(-.7deg); } 50% { transform: translateY(4px) rotate(.7deg); } }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .library-head { text-align: center; }
  .library-head p { margin-inline: auto; }
}
@media (max-width: 1023px) {
  .section-head { display: block; }
  .section-head p { max-width: 650px; margin-top: 16px; }
  .about-grid { gap: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-row { grid-template-columns: minmax(0, 1fr) 40px; gap: 14px 12px; align-items: start; }
  .experience-meta { grid-column: 1; grid-row: 1; }
  .experience-summary { grid-column: 1 / -1; grid-row: 2; }
  .experience-toggle { grid-column: 2; grid-row: 1; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .nav-shell { top: 8px; height: 58px; margin-bottom: -58px; }
  .nav { height: 58px; padding: 0 6px 0 18px; }
  .logo { font-size: 26px; }
  .logo .star-mark { width: 18px; height: 18px; }
  .footer-brand .star-mark { width: 22px; height: 22px; }
  .menu-toggle { width: 44px; height: 44px; order: 3; display: grid; place-content: center; gap: 5px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
  .menu-toggle span { width: 20px; height: 2px; display: block; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .nav-tabs { position: absolute; top: 66px; left: 0; right: 0; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--glass-edge); border-radius: 24px; background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--glass-shadow); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top; transition: opacity .25s, transform .35s var(--ease), visibility .25s; }
  .nav-tabs.open { opacity: 1; visibility: visible; transform: none; }
  .nav-tabs a { min-height: 48px; justify-content: start; padding: 0 16px; border-radius: 16px; font-size: 17px; }
  h2 { font-size: 36px; }
  h3 { font-size: 26px; }
  .section { padding: 64px 0; }
  .hero { padding: 84px 0 28px; }
  .desktop { --offset: 36px; --win-w: 93%; --win-h: clamp(430px, calc(100svh - 330px), 560px); }
  .photo-body { display: flex; flex-direction: column; }
  .portrait-slot { flex: 1 1 auto; min-height: 96px; border-right: 0; border-bottom: 1px solid var(--separator); }
  .sticker { padding: 5px 10px; font-size: 11px; }
  .sticker.one { top: 10px; left: 10px; }
  .sticker.two { right: 10px; bottom: 10px; }
  .hero-card-copy { flex: 0 0 auto; padding: 16px 18px 18px; }
  .name-tag { font-size: 21px; }
  .name-tag small { margin-top: 3px; font-size: 12px; }
  .hero h1 { margin-top: 10px; font-size: clamp(30px, 8.6vw, 40px); }
  .hero-card-copy .actions { flex-wrap: nowrap; gap: 8px; margin-top: 16px; }
  .hero-card-copy .button { flex: 1 1 0; min-height: 42px; padding: 0 10px; gap: 6px; font-size: 14px; white-space: nowrap; }
  .hero-meta { margin-top: 10px; font-size: 11px; }
  .id-body { grid-template-columns: 1fr; grid-template-areas: "left" "right" "bottom"; grid-template-rows: none; padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
  .memoji-slot { flex-basis: 68px; width: 68px; height: 68px; font-size: 24px; }
  .window-bar { min-height: 44px; }
  .window-title { font-size: 12px; }
  .hero-dock { gap: 6px; margin-top: 18px; padding: 8px; border-radius: 22px; }
  .dock-app { width: 46px; height: 46px; border-radius: 12px; }
  .dock-app svg { width: 24px; height: 24px; }
  .dock-app img { width: 22px; height: 22px; }
  .grid, .small-grid, .sidequest, .about-grid { grid-template-columns: 1fr; }
  .work-grid { padding-block: 24px 64px; }
  .trait { width: 220px; }
  .experience { margin-top: 64px; padding-inline: 16px; }
  .experience-row { padding: 20px; }
  .experience-row + .experience-row::before { left: 20px; }
  .experience-orgline strong { font-size: 23px; }
  .process-board { padding: 24px 16px; border-radius: 28px; }
  .process-board h3 { font-size: 30px; }
  .process-canvas { min-height: 270px; }
  .process-canvas .tile:nth-child(1) { --x: 3% !important; --y: 18px !important; }
  .process-canvas .tile:nth-child(2) { --x: 52% !important; --y: 22px !important; }
  .process-canvas .tile:nth-child(3) { --x: 4% !important; --y: 102px !important; }
  .process-canvas .tile:nth-child(4) { --x: 51% !important; --y: 106px !important; }
  .process-canvas .tile:nth-child(5) { --x: 3% !important; --y: 188px !important; }
  .process-canvas .tile:nth-child(6) { --x: 52% !important; --y: 184px !important; }
  .tile { min-width: 44%; min-height: 58px; padding: 10px 12px; font-size: 18px; }
  .playground-flow { gap: 44px; }
  .dock-scroll { --base: 52px; }
  .emrys-art { min-height: 280px; padding: 32px; }
  .emrys-art strong { font-size: 54px; }
  .reading-library { padding-top: 40px; }
  .library-head h3 { font-size: 36px; }
  .bookshelf { margin-top: 24px; padding-top: 38px; }
  .bookshelf { --shelf-pad: 16px; }
  .book-row { height: 210px; gap: 18px; }
  .book { width: calc(var(--book-width) * .82); height: calc(var(--book-height) * .82); }
  .book-title { font-size: 15px; }
  .reading-detail { display: block; min-height: 0; padding: 22px; }
  .reading-detail .button, .library-pending { margin-top: 18px; }
  .footer { padding-top: 72px; }
  .footer h2 { font-size: clamp(52px, 15vw, 72px); }
  .footer-title-row { align-items: flex-start; }
  .footer-brand { font-size: 32px; }
  .socials { grid-template-columns: 1fr 1fr; gap: 8px; margin: 28px 0 40px; }
  .socials a { min-height: 56px; padding: 0 14px; gap: 9px; border-radius: 18px; font-size: 14px; }
  .footnote { flex-direction: column; gap: 6px; }
  dialog { padding: 40px 22px 28px; border-radius: 28px; }
  dialog h2 { font-size: 34px; }
  .page-hero { padding: 96px 0 0; }
  .page-hero h1 { font-size: clamp(34px, 10vw, 44px); }
}
@media (max-width: 520px) {
  .dock-social, .dock-divider { display: none; }
}
@media (max-width: 390px) {
  .hero-card-copy { padding-inline: 14px; }
  .hero-card-copy .button { padding: 0 6px; gap: 4px; font-size: 13px; }
}
@media (hover: none) {
  .dock-tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .traits-marquee { overflow-x: auto; }
  html { scroll-behavior: auto; }
  *, ::before, ::after { animation: none !important; transition: none !important; }
}

/* ---------- About: home screen ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-stage { padding: 104px 0 80px; background: var(--grouped); }
.home-screen { position: relative; isolation: isolate; overflow: hidden; padding: 16px 40px 24px; border-radius: 44px; color: #033660; box-shadow: 0 40px 90px -34px rgba(3, 54, 96, .5), inset 0 0 0 1px rgba(255, 255, 255, .45); }
.home-wallpaper { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(50% 55% at 94% 0%, rgba(42, 179, 214, .5), transparent 72%), radial-gradient(55% 60% at 0% 100%, rgba(10, 71, 117, .3), transparent 72%), radial-gradient(40% 45% at 48% 48%, rgba(255, 255, 255, .5), transparent 72%), linear-gradient(165deg, #e6f8fc 0%, #b8eaf6 48%, #7fcfe6 100%); }
.status-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.status-icons { display: flex; align-items: center; gap: 6px; }
.home-grid { --cell: 112px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: var(--cell); grid-auto-flow: row dense; gap: 26px 22px; margin-top: 24px; }
.app-slot { display: contents; }
.widget { position: relative; min-width: 0; overflow: hidden; padding: 18px; border: 1px solid var(--glass-edge); border-radius: 30px; background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: 0 14px 32px -12px rgba(3, 54, 96, .3), inset 0 1px 0 var(--glass-highlight); color: var(--label); }
.widget-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.w-profile { grid-column: span 4; grid-row: span 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px; }
.w-music, .w-clock, .w-notes { grid-column: span 2; grid-row: span 2; }
.w-story, .w-quests { grid-column: span 4; grid-row: span 2; }
.w-story { padding: 0; }

.profile-card { position: relative; width: 140px; aspect-ratio: 2 / 3; padding: 0; border: 0; background: none; perspective: 800px; }
.profile-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; box-shadow: 0 14px 26px -10px rgba(3, 54, 96, .45); backface-visibility: hidden; transition: transform .7s var(--ease); }
.profile-card .card-joker { transform: rotateY(180deg); }
.profile-card[aria-pressed="true"] .card-jack { transform: rotateY(-180deg); }
.profile-card[aria-pressed="true"] .card-joker { transform: rotateY(0); }
.profile-copy h1 { margin-top: 6px; font-size: clamp(30px, 2.8vw, 42px); line-height: 1; letter-spacing: -.035em; }
.profile-copy h1 span { color: var(--accent); }
.profile-copy p { margin: 10px 0 8px; color: var(--label-2); font-size: 14px; line-height: 1.45; }
.profile-copy .eyebrow { font-size: 11px; }
.widget-hint { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.app { position: relative; min-width: 0; display: grid; align-content: start; justify-items: center; gap: 7px; padding: 0; border: 0; background: none; color: inherit; text-align: center; cursor: pointer; }
.app-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22.5%; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px rgba(3, 54, 96, .22); transition: transform .35s var(--ease); }
.app:hover .app-icon { transform: scale(1.06); }
.app:active .app-icon { transform: scale(.92); }
.app-icon svg { width: 52%; height: 52%; }
.app-icon img { width: 48%; height: 48%; object-fit: contain; }
.app-icon img.invert, .quest-icon img.invert { filter: brightness(0) invert(1); }
.app-icon.is-art, .app-icon.is-folder { overflow: visible; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 6px 10px rgba(3, 54, 96, .22)); }
.app-icon.is-art svg { width: 100%; height: 100%; }
.app-icon.is-folder { place-items: end center; }
.app-icon.is-folder svg { width: 100%; height: auto; }
.app-name { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.app-note { color: var(--label-2); font-size: 11px; line-height: 1.25; }

.w-music { display: flex; flex-direction: column; justify-content: space-between; border-color: rgba(255, 255, 255, .1); background: linear-gradient(160deg, rgba(10, 71, 117, .95), rgba(2, 21, 38, .97)); color: #fff; }
.music-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.music-art { position: relative; flex: 0 0 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); transition: background .4s; }
.music-art img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.eq { position: absolute; right: 6px; bottom: 6px; height: 14px; display: flex; align-items: end; gap: 2px; opacity: 0; transition: opacity .2s; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: #fff; animation: eq .8s ease-in-out infinite alternate; animation-play-state: paused; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.55s; } .eq i:nth-child(4) { animation-delay: -.15s; }
.w-music.is-playing .eq { opacity: 1; }
.w-music.is-playing .eq i { animation-play-state: running; }
.music-meta { min-width: 0; display: grid; }
.music-meta strong, .music-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-meta strong { margin-top: 2px; font-size: 16px; line-height: 1.25; }
.music-meta span:last-child { font-size: 13px; opacity: .7; }
.music-bar { height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.music-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: #fff; }
.music-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.music-controls button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: #fff; transition: transform .25s var(--ease); }
.music-controls button:active { transform: scale(.88); }
.music-controls .music-play { width: 52px; height: 52px; background: #fff; color: #033660; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.music-play .i-pause, .music-play[aria-pressed="true"] .i-play { display: none; }
.music-play[aria-pressed="true"] .i-pause { display: block; }

.w-story { background: #033660; color: #fff; }
.story-track { height: 100%; display: flex; transition: transform .7s var(--ease); }
.story-slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; }
.story-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-photo { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; text-align: center; }
.story-photo span { font: 500 56px/1 var(--heading); letter-spacing: -.03em; text-shadow: 0 2px 12px rgba(0, 0, 0, .15); }
.story-photo small { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.story-slide figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 48px 20px 18px; background: linear-gradient(transparent, rgba(2, 21, 38, .6)); font: 500 21px/1.2 var(--heading); letter-spacing: -.01em; }
.story-slide figcaption span { display: block; margin-bottom: 4px; font: 600 11px var(--body); letter-spacing: .08em; opacity: .8; }
.story-bars { position: absolute; z-index: 2; top: 12px; right: 14px; left: 14px; display: flex; gap: 4px; }
.story-bars i { flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.story-bars b { display: block; width: 0; height: 100%; background: #fff; }
.story-bars i.done b { width: 100%; }
.story-bars i.active b { animation: story-fill 5s linear forwards; }
.w-story:hover .story-bars b, .w-story:focus-within .story-bars b { animation-play-state: paused; }
.story-head { position: absolute; z-index: 2; top: 24px; left: 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .2); pointer-events: none; }
.story-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; }
.story-avatar img { width: 16px; height: 16px; }
.story-nav { position: absolute; z-index: 1; top: 0; bottom: 0; width: 40%; padding: 0; border: 0; background: none; cursor: pointer; }
.story-nav.prev { left: 0; } .story-nav.next { right: 0; }

.w-clock { display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; }
.clock-face { position: relative; width: min(100%, 168px); aspect-ratio: 1; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1px var(--separator), 0 6px 16px rgba(3, 54, 96, .15); }
.clock-face::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: repeating-conic-gradient(from -1.5deg, var(--label-3) 0 3deg, transparent 3deg 30deg); -webkit-mask: radial-gradient(circle, transparent 84%, #000 85%); mask: radial-gradient(circle, transparent 84%, #000 85%); }
.clock-num { position: absolute; color: var(--label); font: 500 15px/1 var(--heading); transform: translate(-50%, -50%); }
.clock-num:nth-of-type(1) { top: 20%; left: 50%; } .clock-num:nth-of-type(2) { top: 50%; left: 80%; } .clock-num:nth-of-type(3) { top: 80%; left: 50%; } .clock-num:nth-of-type(4) { top: 50%; left: 20%; }
.hand { position: absolute; bottom: 50%; left: 50%; border-radius: 3px; transform-origin: 50% 100%; }
.hand.hour { width: 5px; height: 25%; margin-left: -2.5px; background: var(--label); }
.hand.min { width: 3.5px; height: 36%; margin-left: -1.75px; background: var(--label); }
.hand.sec { width: 1.5px; height: 40%; margin-left: -.75px; background: #ff9500; }
.clock-pin { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #ff9500; box-shadow: 0 0 0 2px var(--card); }
.clock-city { color: var(--label); font-size: 13px; font-weight: 600; }

.w-notes { display: flex; flex-direction: column; padding: 0; background: #fffdf5; }
.notes-head { display: flex; align-items: center; gap: 6px; padding: 14px 16px 0; color: #d99a00; font-size: 13px; font-weight: 700; }
.notes-head::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(#ffd60a 0 38%, #fff 38%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.notes-body { display: grid; align-content: start; gap: 8px; padding: 8px 16px 16px; color: #1c1c1e; }
.notes-body blockquote::after { content: ""; display: block; width: 28px; height: 3px; margin-top: 10px; border-radius: 2px; background: #ffd60a; }
.notes-body blockquote { margin: 0; font: 500 21px/1.2 var(--heading); letter-spacing: -.01em; }
.notes-body p { margin: 0; color: rgba(28, 28, 30, .6); font-size: 13px; line-height: 1.45; }

.w-quests { display: flex; flex-direction: column; padding: 16px 18px; }
.quests-head { display: flex; align-items: center; justify-content: space-between; }
.quests-head h2 { font-size: 22px; letter-spacing: -.015em; }
.quests-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 12px; font-weight: 700; text-align: center; }
.quests-note { margin: 2px 0 10px; color: var(--label-2); font-size: 12.5px; line-height: 1.35; }
.quests-list { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.quest { height: 100%; display: flex; align-items: center; gap: 10px; padding: 2px 6px; margin-inline: -6px; border-radius: 10px; transition: background .2s; }
a.quest:hover { background: var(--fill); }
.quest-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; color: #fff; }
.quest-icon svg { width: 17px; height: 17px; }
.quest-icon img { width: 16px; height: 16px; }
.quest-text { min-width: 0; display: grid; line-height: 1.2; }
.quest-name, .quest-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quest-name { font-size: 13.5px; font-weight: 600; }
.quest-note { color: var(--label-2); font-size: 11.5px; }

.home-dots { display: flex; justify-content: center; gap: 8px; margin: 30px 0 16px; }
.home-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(3, 54, 96, .25); transition: background .2s, transform .2s; }
.home-dots button[aria-selected="true"] { background: #033660; transform: scale(1.15); }
.home-dock { width: max-content; max-width: 100%; display: flex; justify-content: center; gap: 22px; margin: 0 auto; padding: 14px 18px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 34px; background: rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
.home-dock .app-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.folder-sheet { width: min(560px, 92vw); padding: 28px; border: 1px solid var(--glass-edge); border-radius: 40px; background: var(--glass-strong); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
.folder-sheet::before { display: none; }
.folder-sheet[open] { animation: folder-open .45s var(--ease); }
.folder-sheet::backdrop { background: rgba(3, 20, 36, .25); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.folder-head { position: relative; margin-bottom: 24px; padding-right: 48px; }
.folder-head h2 { font-size: 34px; }
.folder-head p { margin: 6px 0 0; color: var(--label-2); font-size: 15px; }
.folder-close { position: absolute; top: 0; right: 0; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--fill); font-size: 22px; line-height: 1; }
.folder-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 12px; }
.folder-grid .app-icon { width: 64px; height: 64px; }
.folder-grid .app-name { white-space: normal; }
.folder-grid.is-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.folder-photo { margin: 0; }
.folder-photo > div, .folder-photo img { width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; object-fit: cover; }
.folder-photo > div { display: grid; place-content: center; gap: 2px; color: #fff; text-align: center; }
.folder-photo > div span { font: 500 26px/1 var(--heading); }
.folder-photo > div small { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.folder-photo figcaption { margin-top: 6px; color: var(--label-2); font-size: 13px; }

:root[data-theme="dark"] .home-screen { color: #fff; box-shadow: 0 40px 90px -34px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .home-wallpaper { background: radial-gradient(50% 55% at 94% 0%, rgba(42, 179, 214, .25), transparent 72%), radial-gradient(40% 45% at 48% 48%, rgba(94, 208, 240, .1), transparent 72%), linear-gradient(165deg, #0f3446 0%, #0a2230 50%, #021526 100%); }
:root[data-theme="dark"] .home-dots button { background: rgba(255, 255, 255, .3); }
:root[data-theme="dark"] .home-dots button[aria-selected="true"] { background: #fff; }
:root[data-theme="dark"] .home-dock { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-screen { color: #fff; box-shadow: 0 40px 90px -34px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08); }
  :root:not([data-theme="light"]) .home-wallpaper { background: radial-gradient(50% 55% at 94% 0%, rgba(42, 179, 214, .25), transparent 72%), radial-gradient(40% 45% at 48% 48%, rgba(94, 208, 240, .1), transparent 72%), linear-gradient(165deg, #0f3446 0%, #0a2230 50%, #021526 100%); }
  :root:not([data-theme="light"]) .home-dots button { background: rgba(255, 255, 255, .3); }
  :root:not([data-theme="light"]) .home-dots button[aria-selected="true"] { background: #fff; }
  :root:not([data-theme="light"]) .home-dock { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .1); }
}
@keyframes eq { from { height: 25%; } to { height: 100%; } }
@keyframes story-fill { to { width: 100%; } }
@keyframes folder-open { from { opacity: 0; transform: scale(.86); } }
@media (max-width: 1023px) {
  .home-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .w-profile { grid-column: span 6; }
}
@media (max-width: 767px) {
  .home-stage { padding: 88px 0 56px; }
  .home-screen { padding: 12px 14px 16px; border-radius: 34px; }
  .home-grid { --cell: 92px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; margin-top: 16px; }
  .w-profile { grid-column: span 4; grid-row: span 4; grid-template-columns: 1fr; align-content: start; gap: 14px; }
  .profile-card { width: 104px; }
  .w-story { grid-column: span 4; grid-row: span 3; }
  .w-quests { grid-column: span 4; grid-row: span 4; }
  .quests-list { grid-template-columns: 1fr; }
  .widget { padding: 14px; border-radius: 24px; }
  .w-story, .w-notes { padding: 0; }
  .music-art { flex-basis: 44px; height: 44px; border-radius: 10px; }
  .music-art img { width: 20px; height: 20px; }
  .music-meta strong { font-size: 14px; }
  .music-meta span:last-child, .music-meta .widget-label { display: none; }
  .music-controls { gap: 4px; }
  .music-controls .music-play { width: 44px; height: 44px; }
  .notes-head { padding: 10px 14px; }
  .notes-body { padding: 12px 14px; }
  .notes-body blockquote { font-size: 17px; }
  .notes-body p { display: none; }
  .clock-num { font-size: 12px; }
  .app-icon { width: 60px; height: 60px; }
  .app-name { font-size: 11px; }
  .home-dock { gap: 12px; padding: 10px 12px; border-radius: 28px; }
  .folder-sheet { padding: 22px 18px; border-radius: 32px; }
  .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story-photo span { font-size: 44px; }
  .story-slide figcaption { font-size: 18px; }
}

/* ---------- iPad device ---------- */
.ipad { position: relative; display: block; margin-inline: auto; padding: 14px; border-radius: 34px; background: #0e0f11; box-shadow: 0 0 0 2px #d6d9de, 0 0 0 3.5px #9ca1a8, inset 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 90px -30px rgba(3, 20, 36, .55); }
.ipad-camera { position: absolute; top: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3b4d63, #050608); }
.ipad-screen { position: relative; display: block; overflow: hidden; border-radius: 20px; }
.apple-pencil { position: absolute; z-index: 1; top: -12px; left: 26%; width: 44%; height: 10px; border-radius: 2px 6px 6px 2px; background: linear-gradient(#fff, #e6e8eb 60%, #c8ccd1); box-shadow: 0 2px 4px rgba(0, 0, 0, .18); }
.apple-pencil::before { content: ""; position: absolute; top: 0; right: 100%; width: 24px; height: 10px; background: linear-gradient(#f5f5f7, #cdd1d5); clip-path: polygon(100% 0, 100% 100%, 18% 62%, 0 50%, 18% 38%); }
.apple-pencil::after { content: ""; position: absolute; top: 0; left: 18%; width: 1px; height: 100%; background: rgba(0, 0, 0, .08); }

/* Home page lock screen */
.about-grid { align-items: center; }
.about-device { padding-top: 14px; }
.ipad-lock { width: 100%; max-width: 620px; transition: transform .6s var(--ease); }
.ipad-lock:hover { transform: translateY(-6px) rotate(-1deg); }
.lock-screen { aspect-ratio: 1.47; display: flex; flex-direction: column; align-items: center; padding: 5% 6% 3%; background: radial-gradient(500px 300px at 80% 0%, rgba(255, 255, 255, .6), transparent 60%), linear-gradient(165deg, #d9f4fb 0%, #9fdcee 55%, #3c9cc6 100%); color: #033660; text-align: center; }
.lock-date { font-size: clamp(11px, 1.1vw, 14px); font-weight: 600; opacity: .8; }
.lock-time { font: 500 clamp(52px, 6.4vw, 92px)/1 var(--heading); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.lock-portrait { position: relative; flex: 1 1 0; width: 100%; min-height: 0; margin-top: 3%; }
.lock-portrait img { position: absolute; top: 0; left: 50%; height: 100%; width: auto; max-width: none; border-radius: 10px; box-shadow: 0 16px 30px -12px rgba(3, 54, 96, .5); transform: translateX(-50%); }
.lock-hint { margin-top: 3%; padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: clamp(11px, 1vw, 13px); font-weight: 600; }
.lock-bar { width: 26%; height: 4px; margin-top: 3%; border-radius: 3px; background: rgba(3, 54, 96, .55); }
:root[data-theme="dark"] .lock-screen { background: radial-gradient(500px 300px at 80% 0%, rgba(94, 208, 240, .25), transparent 60%), linear-gradient(165deg, #0f3446, #021526); color: #fff; }
:root[data-theme="dark"] .lock-bar { background: rgba(255, 255, 255, .6); }
:root[data-theme="dark"] .lock-hint { background: rgba(255, 255, 255, .14); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lock-screen { background: radial-gradient(500px 300px at 80% 0%, rgba(94, 208, 240, .25), transparent 60%), linear-gradient(165deg, #0f3446, #021526); color: #fff; }
  :root:not([data-theme="light"]) .lock-bar { background: rgba(255, 255, 255, .6); }
  :root:not([data-theme="light"]) .lock-hint { background: rgba(255, 255, 255, .14); }
}

/* About page iPad */
.about-home { min-height: 0; background: var(--grouped); }
.ipad-stage { padding: 104px 0 64px; }
.ipad-stage .ipad { width: min(100%, 620px); padding: 12px; border-radius: 40px; }
.ipad-stage .ipad-camera { top: 4px; }
.ipad-stage .ipad-screen { border-radius: 30px; }
.ipad-screen .home-screen { border-radius: 0; box-shadow: none; }
.home-dock .dock-sep { align-self: stretch; width: 1px; margin: 6px 2px; background: rgba(3, 54, 96, .2); }
:root[data-theme="dark"] .home-dock .dock-sep { background: rgba(255, 255, 255, .2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home-dock .dock-sep { background: rgba(255, 255, 255, .2); } }
@media (min-width: 900px) {
  .ipad-stage { padding: 92px 0 48px; }
  .ipad-stage .ipad { --w: min(1120px, 94vw, calc((100svh - 124px) * 1.43)); width: var(--w); margin-top: 18px; padding: calc(var(--w) * .021); border-radius: calc(var(--w) * .046); }
  .ipad-stage .ipad-camera { top: calc(var(--w) * .0105 - 2.5px); }
  .ipad-stage .ipad-screen { aspect-ratio: 1000 / 680; border-radius: calc(var(--w) * .026); }
  .ipad-stage .apple-pencil { top: -13px; height: 11px; }
  .ipad-screen .home-screen { position: absolute; top: 0; left: 0; width: 1000px; height: 680px; display: flex; flex-direction: column; padding: 12px 30px 14px; transform-origin: 0 0; }
  .ipad-screen .home-pages { flex: 1; min-height: 0; margin-top: 10px; }
  .ipad-screen .home-track { height: 100%; align-items: stretch; }
  .ipad-screen .home-grid { height: 100%; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; gap: 16px; }
  .ipad-screen .art-grid { flex: 1; min-height: 0; }
  .ipad-screen .widget { padding: 16px; border-radius: 24px; }
  .ipad-screen .w-profile, .ipad-screen .w-quests { grid-column: span 4; grid-row: span 2; }
  .ipad-screen .w-music, .ipad-screen .w-story, .ipad-screen .w-notes { grid-column: span 2; grid-row: span 2; }
  .ipad-screen .w-story, .ipad-screen .w-notes { padding: 0; }
  .ipad-screen .profile-card { width: 116px; }
  .ipad-screen .profile-copy h1 { font-size: 34px; }
  .ipad-screen .profile-copy p { font-size: 13px; }
  .ipad-screen .music-art { flex-basis: 52px; height: 52px; }
  .ipad-screen .music-controls .music-play { width: 46px; height: 46px; }
  .ipad-screen .story-photo span { font-size: 34px; }
  .ipad-screen .story-slide figcaption { padding: 30px 14px 12px; font-size: 15px; }
  .ipad-screen .story-head { font-size: 11px; }
  .ipad-screen .notes-body blockquote { font-size: 17px; }
  .ipad-screen .notes-body p { font-size: 11.5px; line-height: 1.4; }
  .ipad-screen .quests-head h2 { font-size: 19px; }
  .ipad-screen .quests-note { margin-bottom: 6px; font-size: 11.5px; }
  .ipad-screen .quest-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .ipad-screen .app-icon { width: 62px; height: 62px; }
  .ipad-screen .home-dots { margin: 10px 0 8px; }
  .ipad-screen .home-dock { gap: 14px; padding: 9px 14px; border-radius: 26px; }
  .ipad-screen .home-dock .app-icon { width: 54px; height: 54px; }
}

@media (max-width: 899px) {
  .home-dock .dock-sep, .home-dock .dock-sep ~ * { display: none; }
}
@media (max-width: 767px) {
  .ipad-stage .home-dock { gap: 10px; padding: 8px 10px; }
  .ipad-stage .home-dock .app-icon { width: 50px; height: 50px; }
}

/* Procreate */
.procreate { width: min(900px, 94vw); height: min(640px, 86vh); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 28px; background: #1c1c1e; color: #fff; }
.procreate[open] { display: flex; flex-direction: column; animation: folder-open .4s var(--ease); }
.procreate::before { display: none; }
.procreate-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 22px; }
.procreate-bar h2 { font: 600 16px/1 var(--body); letter-spacing: 0; }
.procreate-tools { display: flex; align-items: center; gap: 12px; }
.procreate-swatches { display: flex; gap: 8px; }
.procreate-swatches button { width: 26px; height: 26px; padding: 0; border: 2px solid rgba(255, 255, 255, .25); border-radius: 50%; }
.procreate-swatches button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #1c1c1e, 0 0 0 4px rgba(255, 255, 255, .6); }
.procreate .button { min-height: 36px; padding: 0 16px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 14px; }
.procreate .folder-close { position: static; background: rgba(255, 255, 255, .12); color: #fff; }
#procreate-canvas { flex: 1; min-height: 0; margin: 0 14px; border-radius: 16px; background: #fbfaf7; touch-action: none; cursor: crosshair; }
.procreate-hint { margin: 10px 0 14px; color: rgba(255, 255, 255, .55); font-size: 12px; text-align: center; }
@media (max-width: 767px) {
  .about-device { padding-top: 24px; }
  .ipad-lock { padding: 10px; border-radius: 28px; }
  .ipad-lock .ipad-screen { border-radius: 18px; }
  .ipad-lock .ipad-camera { top: 3px; }
  .apple-pencil { top: -10px; height: 8px; }
  .apple-pencil::before { width: 18px; height: 8px; }
  .procreate-bar { flex-wrap: wrap; }
  .procreate-swatches button { width: 22px; height: 22px; }
}

/* Home screen pages + Art Board */
.home-pages { overflow: hidden; margin-top: 24px; transition: height .5s var(--ease); }
.home-track { display: flex; align-items: flex-start; transition: transform .6s var(--ease); }
.home-track > .home-page { flex: 0 0 100%; min-width: 0; margin-top: 0; }
.art-board { display: flex; flex-direction: column; padding: 2px; }
.art-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.art-head h2 { font-size: 30px; }
.art-head p { margin: 2px 0 0; font-size: 13px; opacity: .75; }
.art-new { min-height: 40px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 16px 0 8px; border: 0; border-radius: 999px; background: #1c1c1e; color: #fff; font-size: 13px; font-weight: 600; transition: transform .3s var(--ease); }
.art-new:active { transform: scale(.95); }
.art-new-icon { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(45deg, #ffd23f, #ff4e50 50%, #6a5bff); }
.art-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: min-content; align-content: start; gap: 14px; overflow: auto; padding: 2px; scrollbar-width: none; }
.art-grid::-webkit-scrollbar { display: none; }
.art-tile { position: relative; aspect-ratio: 4 / 3; margin: 0; overflow: hidden; border-radius: 18px; background: #fbfaf7; box-shadow: 0 10px 24px -12px rgba(3, 54, 96, .35); }
.art-tile img { width: 100%; height: 100%; object-fit: contain; }
.art-tile figcaption { position: absolute; bottom: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: #033660; font-size: 11px; font-weight: 600; }
.art-tile.is-placeholder { display: grid; place-content: center; gap: 2px; color: #fff; text-align: center; }
.art-tile.is-placeholder span { font: 500 24px/1 var(--heading); }
.art-tile.is-placeholder small { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.art-delete { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; line-height: 1; opacity: 0; transition: opacity .15s; }
.art-tile:hover .art-delete, .art-delete:focus-visible { opacity: 1; }
@media (hover: none) { .art-delete { opacity: 1; } }
.procreate .button.is-primary { background: #fff; color: #1c1c1e; }
.safe-badge { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(52, 199, 89, .2); color: #5ee08a; font-weight: 700; }
@media (max-width: 767px) {
  .art-head h2 { font-size: 24px; }
  .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .art-tile { border-radius: 14px; }
}

/* Tooltip that follows the pointer */
.cursor-tip-layer { position: fixed; inset: auto; top: 0; left: 0; z-index: 2147483647; width: 0; height: 0; margin: 0; padding: 0; overflow: visible; border: 0; background: none; pointer-events: none; }
.cursor-tip { position: absolute; top: 20px; left: 16px; padding: 5px 11px; border-radius: 999px; background: #033660; color: #fff; font: 600 12px/1.2 var(--body); letter-spacing: 0; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(3, 20, 36, .5); opacity: 0; transform: translateY(4px) scale(.96); transition: opacity .18s, transform .3s var(--ease); }
.cursor-tip-layer.is-tip .cursor-tip { opacity: 1; transform: none; }
.cursor-tip-layer.is-away .cursor-tip { opacity: 0; }
:root[data-theme="dark"] .cursor-tip { background: #fff; color: #033660; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cursor-tip { background: #fff; color: #033660; } }

/* Portrait iPad on phones and tablets */
@media (max-width: 899px) {
  .ipad-stage { padding: 84px 0 40px; }
  .ipad-stage .ipad { width: min(90vw, calc((100svh - 150px) * .66), 440px); padding: 8px; border-radius: 30px; }
  .ipad-stage .ipad-camera { top: 3px; }
  .ipad-stage .ipad-screen { aspect-ratio: 460 / 700; border-radius: 23px; }
  .ipad-stage .apple-pencil { top: -10px; height: 8px; }
  .ipad-screen .home-screen { position: absolute; top: 0; left: 0; width: 460px; height: 700px; display: flex; flex-direction: column; padding: 10px 16px 12px; transform-origin: 0 0; }
  .ipad-screen .status-bar { padding: 4px 6px 0; font-size: 12px; }
  .ipad-screen .home-pages { flex: 1; min-height: 0; margin-top: 8px; }
  .ipad-screen .home-track { height: 100%; align-items: stretch; }
  .ipad-screen .home-grid { height: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); grid-auto-rows: auto; gap: 10px; }
  .ipad-screen .widget { padding: 12px; border-radius: 20px; }
  .ipad-screen .w-profile { grid-column: span 4; grid-row: span 2; grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 12px; }
  .ipad-screen .w-music, .ipad-screen .w-quests, .ipad-screen .w-story { grid-column: span 2; grid-row: span 2; }
  .ipad-screen .w-story, .ipad-screen .w-notes { padding: 0; }
  .ipad-screen .w-notes { display: none; }
  .ipad-screen .profile-card { width: 78px; }
  .ipad-screen .profile-copy .eyebrow { display: none; }
  .ipad-screen .profile-copy h1 { margin-top: 0; font-size: 24px; }
  .ipad-screen .profile-copy p { margin: 6px 0 4px; font-size: 11.5px; line-height: 1.35; }
  .ipad-screen .widget-hint { font-size: 10px; }
  .ipad-screen .music-top { gap: 8px; }
  .ipad-screen .music-art { flex-basis: 40px; height: 40px; border-radius: 9px; }
  .ipad-screen .music-art img { width: 18px; height: 18px; }
  .ipad-screen .music-meta strong { font-size: 13px; }
  .ipad-screen .music-meta .widget-label, .ipad-screen .music-meta span:last-child { display: none; }
  .ipad-screen .music-controls { gap: 6px; }
  .ipad-screen .music-controls button { width: 32px; height: 32px; }
  .ipad-screen .music-controls .music-play { width: 40px; height: 40px; }
  .ipad-screen .story-photo span { font-size: 26px; }
  .ipad-screen .story-slide figcaption { padding: 22px 10px 8px; font-size: 12px; }
  .ipad-screen .story-slide figcaption span { font-size: 9px; }
  .ipad-screen .story-bars { top: 8px; right: 10px; left: 10px; }
  .ipad-screen .story-head { top: 16px; left: 10px; gap: 5px; font-size: 9.5px; }
  .ipad-screen .story-avatar { width: 18px; height: 18px; }
  .ipad-screen .story-avatar img { width: 11px; height: 11px; }
  .ipad-screen .quests-head h2 { font-size: 15px; }
  .ipad-screen .quests-count { min-width: 18px; padding: 0 6px; font-size: 10px; }
  .ipad-screen .quests-note { display: none; }
  .ipad-screen .quests-list { grid-template-columns: 1fr; gap: 2px; margin-top: 6px; }
  .ipad-screen .quest { gap: 7px; padding: 1px 4px; margin-inline: -4px; }
  .ipad-screen .quest-icon { width: 19px; height: 19px; flex-basis: 19px; border-radius: 5px; }
  .ipad-screen .quest-icon svg { width: 12px; height: 12px; }
  .ipad-screen .quest-icon img { width: 11px; height: 11px; }
  .ipad-screen .quest-name { font-size: 11.5px; }
  .ipad-screen .quest-note { display: none; }
  .ipad-screen .app-icon { width: 50px; height: 50px; }
  .ipad-screen .app-name { font-size: 11px; }
  .ipad-screen .home-dots { gap: 7px; margin: 6px 0; }
  .ipad-screen .home-dots button { width: 7px; height: 7px; }
  .ipad-screen .home-dock { gap: 10px; padding: 7px 10px; border-radius: 22px; }
  .ipad-screen .home-dock .app-icon { width: 44px; height: 44px; }
  .ipad-screen .art-head { margin-bottom: 10px; }
  .ipad-screen .art-head h2 { font-size: 22px; }
  .ipad-screen .art-head p { font-size: 11px; }
  .ipad-screen .art-new { min-height: 32px; padding: 0 12px 0 6px; font-size: 12px; }
  .ipad-screen .art-new-icon { width: 22px; height: 22px; border-radius: 6px; }
  .ipad-screen .art-grid { flex: 1; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ipad-screen .art-tile { border-radius: 12px; }
  .ipad-screen .art-tile.is-placeholder span { font-size: 18px; }
}

/* ---------- Case study ---------- */
.case-page { background: var(--bg); }
html.modal-open { overflow: hidden; }
.case-wrap { width: min(calc(100% - 48px), 1240px); margin-inline: auto; }
.case-hero { position: sticky; top: 0; z-index: 0; height: 100svh; display: grid; place-items: center; padding: 88px 24px 14svh; overflow: hidden; background: var(--hero-tint); }
.case-hero-media { display: block; width: auto; height: auto; max-width: min(100%, 1400px); max-height: 100%; aspect-ratio: auto; object-fit: contain; border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .45); }
.case-sheet { position: relative; z-index: 2; margin-top: -12svh; padding: clamp(40px, 6vh, 64px) 0 96px; border-radius: 32px 32px 0 0; background: var(--bg); box-shadow: 0 -24px 60px -24px rgba(3, 20, 36, .35); }
.case-close { position: absolute; z-index: 3; top: clamp(20px, 3vh, 32px); right: max(24px, calc((100vw - 1240px) / 2)); width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--card); color: var(--label); box-shadow: var(--shadow-card); transition: transform .3s var(--ease); }
.case-close:hover { transform: scale(1.06); }
.case-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(32px, 5vw, 80px); padding-block: clamp(16px, 4vh, 48px); }
.case-intro h1 { margin-top: 8px; font-size: clamp(34px, 3.6vw, 56px); line-height: 1.02; letter-spacing: -.035em; }
.case-intro h1 span { display: block; margin-top: 4px; color: var(--label-2); font-size: .62em; letter-spacing: -.02em; }
.case-overview { margin: 18px 0 18px; color: var(--label); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; }
.case-intro .actions { margin-top: 22px; }
.case-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 0; padding: 8px 24px; border-radius: 24px; background: var(--card-alt); }
.case-details div { padding: 14px 0; border-bottom: 1px solid var(--separator); }
.case-details div:nth-last-child(-n+2) { border-bottom: 0; }
.case-details div:nth-child(5) { grid-column: 1 / -1; border-bottom: 1px solid var(--separator); }
.case-details dt { color: var(--label-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.case-details dd { margin: 4px 0 0; font-size: 15px; line-height: 1.45; }
.case-tabs { position: sticky; top: 84px; z-index: 5; margin: 24px 0 0; pointer-events: none; }
.case-tabs-inner { width: max-content; max-width: calc(100% - 32px); display: flex; gap: 6px; margin-inline: auto; padding: 6px; overflow-x: auto; border: 1px solid var(--glass-edge); border-radius: 999px; background: var(--glass-strong); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: var(--glass-shadow); scrollbar-width: none; pointer-events: auto; }
.case-tabs-inner::-webkit-scrollbar { display: none; }
.case-tab, .case-tab-top { flex: 0 0 auto; min-height: 38px; display: grid; place-items: center; padding: 0 16px; border-radius: 999px; color: var(--label); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s; }
.case-tab-top { width: 38px; padding: 0; background: var(--fill); }
.case-tab:hover { background: var(--fill); }
.case-tab.active { background: var(--accent); color: var(--on-accent); }
.case-section { padding-top: 64px; scroll-margin-top: 140px; }
.case-section h2 { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; font-size: clamp(26px, 2.6vw, 36px); }
.case-section h2 small { color: var(--accent); font: 600 14px var(--body); letter-spacing: .04em; }
.case-slide { --ar: 1.7778; position: relative; width: min(100%, calc((100svh - 170px) * var(--ar))); margin: 0 auto 24px; overflow: hidden; border-radius: 16px; background: var(--card-alt); box-shadow: 0 0 0 1px var(--separator), 0 20px 40px -28px rgba(3, 20, 36, .35); }
.case-slide.is-tall { width: min(100%, 1240px); }
.case-slide img { display: block; width: 100%; height: auto; image-rendering: auto; }
.slide-overlay { position: absolute; display: block; object-fit: cover; pointer-events: none; }
video.slide-overlay { background: transparent; }
.case-text { max-width: 760px; margin: 0 auto 24px 0; }
.case-text p { margin: 0 0 14px; color: var(--label-2); font-size: 18px; line-height: 1.65; }
.case-video { width: min(100%, calc((100svh - 170px) * 2.05)); margin: 0 auto 24px; }
.case-video video { display: block; width: 100%; border-radius: 16px; background: #000; }
.case-video figcaption { margin-top: 10px; color: var(--label-2); font-size: 13px; text-align: center; }
.case-embed iframe { display: block; width: min(100%, 400px); height: min(820px, calc(100svh - 190px)); margin: 0 auto 16px; border: 10px solid #111; border-radius: 44px; background: #fff; }
.case-embed .button { display: flex; width: max-content; margin-inline: auto; }
.case-soon { padding: 36px; border: 1px dashed var(--separator); border-radius: 20px; color: var(--label-3); text-align: center; }
.case-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 80px; }
.case-next a { display: grid; gap: 4px; padding: 22px 26px; border-radius: 22px; background: var(--card-alt); font: 500 24px/1.1 var(--heading); transition: transform .35s var(--ease); }
.case-next a:last-child { text-align: right; }
.case-next a:hover { transform: translateY(-3px); }
.case-next small { color: var(--label-3); font: 600 12px var(--body); letter-spacing: .06em; text-transform: uppercase; }
.proto-dialog { width: min(96vw, calc((100svh - 80px) * 1.6)); height: min(calc(100svh - 48px), calc(96vw / 1.6 + 48px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #1c1c1e; box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }
.proto-dialog::before { display: none; }
.proto-dialog::backdrop { background: rgba(3, 20, 36, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.proto-dialog[open] { display: block; animation: folder-open .35s var(--ease); }
.proto-shell { display: flex; flex-direction: column; width: 100%; height: 100%; }
.proto-bar { flex: 0 0 44px; display: flex; align-items: center; gap: 14px; padding: 0 10px 0 16px; background: #2a2a2d; color: #fff; }
.proto-title { flex: 1; font-size: 13px; font-weight: 600; text-align: center; opacity: .8; }
.proto-close { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; }
.proto-shell iframe { flex: 1; width: 100%; border: 0; background: #1c1c1e; }
@media (max-width: 1023px) {
  .case-intro { grid-template-columns: 1fr; min-height: 0; gap: 28px; }
}
@media (max-width: 767px) {
  .case-wrap { width: calc(100% - 32px); }
  .case-hero { height: auto; min-height: 0; position: relative; padding: 84px 16px 64px; }
  .case-hero-media { width: 100%; border-radius: 12px; }
  .case-sheet { margin-top: -36px; padding-top: 72px; border-radius: 26px 26px 0 0; }
  .case-close { top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 12px; }
  .case-details { gap: 0 16px; padding: 4px 16px; }
  .case-details div { padding: 10px 0; }
  .case-details dd { font-size: 14px; }
  .case-tabs { top: 74px; }
  .case-section { padding-top: 44px; }
  .case-slide, .case-slide.is-tall { width: 100%; border-radius: 10px; margin-bottom: 14px; }
  .case-embed iframe { height: 680px; }
  .case-next { grid-template-columns: 1fr; }
  .proto-dialog { width: 100vw; height: 100svh; border-radius: 0; }
}
.extras-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 96px; }
.extra-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 24px; background: var(--card-alt); transition: transform .35s var(--ease); }
.extra-card:hover { transform: translateY(-4px); }
.extra-card h3 { font-size: 22px; }
.extra-card p { margin: 0; color: var(--label-2); font-size: 14px; }
.extra-card .tags { margin-top: auto; padding-top: 6px; }
.extra-card .extra-cta { color: var(--accent); font-size: 14px; font-weight: 600; }
.work-subhead { padding-top: 16px; }
.work-subhead h2 { margin: 8px 0 24px; }
a.project { color: var(--label); }
@media (max-width: 767px) {
  .extras-grid { grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 1023px) { .extras-grid { grid-template-columns: 1fr 1fr; } }

/* Memoji */
.portrait-slot.has-memoji { background: radial-gradient(circle at 50% 38%, #e6f8fc, #b8eaf6 70%); }
.portrait-slot .portrait-memoji { position: relative; inset: auto; width: min(78%, 360px); height: auto; max-height: 86%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(3, 54, 96, .22)); }
:root[data-theme="dark"] .portrait-slot.has-memoji { background: radial-gradient(circle at 50% 38%, #1d4a5e, #0c2735 70%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .portrait-slot.has-memoji { background: radial-gradient(circle at 50% 38%, #1d4a5e, #0c2735 70%); } }
.memoji-slot img { object-fit: contain; padding: 4px 4px 0; }
.lock-portrait.is-memoji img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 16px 22px rgba(3, 54, 96, .3)); }
.story-slide img.is-memoji, .folder-photo img.is-memoji { object-fit: contain; padding: 8% 0 18%; }
.folder-photo img.is-memoji { padding: 6%; }
.folder-photo img { display: block; }

/* Home About: iPad + statement */
.about-feature { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-feature .about-device { padding-top: 18px; }
.about-caption { margin: 22px 0 0; color: var(--label-2) !important; font: 500 clamp(18px, 1.5vw, 22px)/1.3 var(--heading); letter-spacing: -.01em; }
.about-title { margin: 10px 0 22px; font-size: clamp(22px, 2vw, 28px); color: var(--label-2); letter-spacing: -.015em; }
.about-feature p.about-statement { margin: 0 0 26px; color: var(--label); font: 500 clamp(24px, 2.35vw, 36px)/1.22 var(--heading); letter-spacing: -.025em; }
.about-feature p.about-statement.is-secondary { color: var(--label); }
.about-highlight { color: var(--accent); background-image: linear-gradient(currentColor, currentColor); background-position: 0 100%; background-repeat: no-repeat; background-size: 100% 2px; padding-bottom: 2px; }
@media (max-width: 767px) {
  .about-feature { grid-template-columns: 1fr; gap: 36px; }
  .about-feature p.about-statement { font-size: clamp(22px, 6.4vw, 28px); margin-bottom: 18px; }
}

/* Case study: full-screen media, collapsible tabs */
.case-hero { padding: 0; }
.case-hero-media { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.case-slide, .case-slide.is-tall { width: 100vw; max-width: none; margin: 0 calc(50% - 50vw); border-radius: 0; box-shadow: none; background: transparent; }
.case-slide + .case-slide { margin-top: 0; }
.case-video { width: 100vw; margin: 0 calc(50% - 50vw) 0; }
.case-video video { border-radius: 0; box-shadow: none; }
.case-section h2 { margin-bottom: 24px; }
.case-tab-toggle { flex: 0 0 38px; width: 38px; min-height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: var(--fill); color: var(--label); cursor: pointer; }
.case-tab-toggle svg path { transition: transform .3s var(--ease), opacity .2s; transform-origin: center; }
.case-tabs-inner .case-tab { transition: max-width .35s var(--ease), opacity .25s, padding .35s var(--ease), background .2s, color .2s; max-width: 240px; overflow: hidden; }
.case-tabs.is-collapsed .case-tab { max-width: 0; padding-inline: 0; opacity: 0; pointer-events: none; }
.case-tabs.is-collapsed .case-tabs-inner { gap: 0; }
@media (max-width: 767px) {
  .case-hero { height: auto; padding: 72px 0 0; }
  .case-hero-media { height: auto; object-fit: contain; }
}

/* Cards with project cover images */
.cover.has-image { padding: 0; background: var(--card-alt); }
.cover.has-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .cover.has-image img { transform: scale(1.04); }
.extra-thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; margin-bottom: 14px; border: 1.5px dashed var(--separator); border-radius: 16px; background: var(--fill); color: var(--label-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cut-row .small-card .eyebrow { margin-top: 0; }

/* Case study slides get their own viewport below the nav + tabs */
.case-section { scroll-margin-top: 150px; }
.case-slide, .case-slide.is-tall { --top: 156px; width: min(96vw, calc((100svh - var(--top) - 20px) * var(--ar))); max-width: none; margin: 0 auto 28px; border-radius: 14px; box-shadow: 0 0 0 1px var(--separator); background: var(--card-alt); }
.case-slide.is-tall { width: min(96vw, 1440px); }
.case-slide + .case-slide { margin-top: 0; }
.case-video { width: min(96vw, calc((100svh - 176px) * 2.05)); margin: 0 auto 28px; }
.case-video video { border-radius: 14px; }
.case-hero { padding: 96px 3vw 13svh; }
.case-hero-media { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; }
@media (max-width: 767px) {
  .case-slide, .case-slide.is-tall, .case-video { width: calc(100vw - 20px); border-radius: 10px; margin-bottom: 14px; }
  .case-hero { padding: 76px 10px 48px; }
  .case-hero-media { width: 100%; }
}
.case-slide, .case-slide.is-tall, .case-video { position: relative; left: 50%; margin-left: 0; margin-right: 0; transform: translateX(-50%); }

/* Case study: one consistent slide width, left-aligned tab bar, compact mobile */
.case-slide, .case-slide.is-tall, .case-video { width: min(92vw, 1360px); }
.case-tabs-inner { margin-left: max(16px, calc((100vw - 1240px) / 2)); margin-right: auto; }
@media (max-width: 767px) {
  .case-hero { padding: 72px 8px 32px; }
  .case-sheet { margin-top: -24px; padding: 56px 0 56px; border-radius: 22px 22px 0 0; }
  .case-close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .case-intro { gap: 18px; padding-block: 0; }
  .case-intro h1 { font-size: 30px; }
  .case-overview { margin: 10px 0; font-size: 15px; }
  .case-intro .actions { margin-top: 14px; }
  .case-intro .button { min-height: 42px; font-size: 14px; }
  .case-details { padding: 2px 14px; border-radius: 18px; }
  .case-details div { padding: 8px 0; }
  .case-details dt { font-size: 10px; }
  .case-details dd { font-size: 13px; }
  .case-tabs { top: 70px; margin-top: 16px; }
  .case-tabs-inner { margin-left: 10px; padding: 4px; gap: 2px; }
  .case-tab, .case-tab-top, .case-tab-toggle { min-height: 32px; font-size: 13px; padding: 0 11px; }
  .case-tab-toggle { flex-basis: 32px; width: 32px; padding: 0; }
  .case-section { padding-top: 26px; scroll-margin-top: 120px; }
  .case-section h2 { margin-bottom: 10px; font-size: 20px; }
  .case-slide, .case-slide.is-tall, .case-video { width: calc(100vw - 16px); margin-bottom: 8px; border-radius: 8px; }
  .case-embed iframe { height: min(640px, 78svh); width: min(100%, 340px); }
  .case-next { margin-top: 40px; }
  .case-next a { padding: 16px 18px; font-size: 18px; }
}

/* Featured cards: name label sits above the question */
.project .project-name { margin: 0 0 4px; }
/* Smaller exploration cards */
.cut-row .small-card { width: min(280px, 72vw); padding: 16px; border-radius: 20px; }
.cut-row .small-card h3 { margin: 8px 0 6px; font-size: 19px; }
.cut-row .small-card p { font-size: 13px; line-height: 1.45; }
.cut-row .small-card .eyebrow { font-size: 11px; }
.extra-thumb { margin-bottom: 10px; border-radius: 12px; font-size: 10px; }
.extras-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.extra-card { gap: 6px; padding: 16px; border-radius: 20px; }
.extra-card h3 { font-size: 17px; }
.extra-card p { font-size: 13px; }
@media (max-width: 1023px) { .extras-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .extras-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .extra-card { padding: 12px; } .extra-card h3 { font-size: 15px; } .extra-card p { display: none; } }
.cut-scroll { --edge: calc((100vw - min(88vw, 1280px)) / 2); padding-inline: var(--edge); scroll-padding-inline: var(--edge); }
@media (max-width: 767px) { .cut-scroll { --edge: 16px; } }
.cut-scroll { scroll-snap-type: x proximity; }

/* Memoji replaces the Jack card */
.profile-card { aspect-ratio: 1 / 1.1; }
.profile-card img { object-fit: contain; border-radius: 22px; background: radial-gradient(circle at 50% 40%, #e6f8fc, #b8eaf6 75%); box-shadow: none; padding: 8% 6% 0; }

/* Memoji ⇄ photo flips */
.flip-avatar { position: relative; padding: 0; border: 0; cursor: pointer; perspective: 600px; overflow: visible; background: none; }
.flip-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; backface-visibility: hidden; transition: transform .6s var(--ease); }
.flip-avatar .flip-front { object-fit: contain; padding: 4px 4px 0; background: radial-gradient(circle at 32% 26%, #ffffff, #cdeff8); }
.flip-avatar .flip-back { object-fit: cover; object-position: 50% 30%; transform: rotateY(180deg); }
.flip-avatar[aria-pressed="true"] .flip-front { transform: rotateY(-180deg); }
.flip-avatar[aria-pressed="true"] .flip-back { transform: rotateY(0); }
.flip-avatar img.is-fallback { object-fit: contain; background: radial-gradient(circle at 32% 26%, #ffffff, #cdeff8); }
.profile-card img.is-photo { object-fit: cover; object-position: 50% 30%; padding: 0; }
.profile-card img.is-photo.is-fallback { object-fit: contain; padding: 8% 6% 0; }

/* Static photo avatars */
.photo-avatar img { width: 100%; height: 100%; object-fit: cover; padding: 0; border-radius: 50%; }
.profile-card.is-static img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; padding: 0; border-radius: 22px; transform: none; }

/* About: real photos + memoji profile */
.profile-card.is-static.is-memoji img { object-fit: contain; padding: 8% 6% 0; background: radial-gradient(circle at 50% 40%, #e6f8fc, #b8eaf6 75%); }
.story-slide img, .folder-photo img { object-fit: cover; }
.quest-icon img.is-photo { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
/* Home: Emrys Craft gallery */
.emrys-gallery { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 460px; }
.emrys-gallery img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 22px; }
.emrys-gallery .eg-main { grid-row: 1 / 3; }
.emrys-gallery .eg-logo { position: absolute; width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 10px 24px rgba(3,54,96,.25); }
.emrys-gallery { position: relative; }
.emrys-gallery .eg-logo { left: 14px; bottom: 14px; }
.emrys-gallery img:nth-child(3) { grid-column: 2; grid-row: 2; }
@media (max-width: 767px) { .emrys-gallery { height: 340px; gap: 8px; } .emrys-gallery img { border-radius: 16px; } .emrys-gallery .eg-logo { width: 60px; height: 60px; } }

/* ---------- Mobile scroll + responsiveness fixes ---------- */
html, body { overscroll-behavior-x: none; }
.cut-scroll, .bookshelf, .case-tabs-inner { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.bookshelf { touch-action: auto; }
.canvas { touch-action: pan-y; }
@media (max-width: 767px) {
  /* Toolkit: wrap instead of a hidden sideways scroller */
  .dock-scroll { overflow: visible; padding-top: 8px; }
  .tool-dock { width: 100%; }
  .tool-group { width: 100%; height: auto; flex-wrap: wrap; justify-content: center; gap: 12px 8px; padding: 12px; }
  .dock-item { --s: 1 !important; width: 56px; }
  .dock-icon { width: 48px; height: 48px; }
  .dock-item > span:not(.dock-icon) { font-size: 10px; }
  /* Home About copy */
  .about-title { font-size: 20px; margin-bottom: 14px; }
  .about-feature p.about-statement { font-size: 20px; line-height: 1.3; margin-bottom: 14px; }
  .about-feature .about-device { padding-top: 8px; }
  /* Section rhythm */
  .section { padding: 48px 0; }
  h2 { font-size: 30px; }
  .section-head { margin-bottom: 24px; }
  .experience { margin-top: 40px; }
  .experience h3 { font-size: 28px; }
  .experience-summary p { font-size: 14px; }
  .emrys-gallery { height: 300px; }
  .footer h2 { font-size: clamp(44px, 13vw, 60px); }
  .process-board h3 { font-size: 26px; }
}

/* About: hand-drawn stroke behind the iPad */
.ipad-stage { position: relative; isolation: isolate; overflow: hidden; }
.ipad-stage::before { content: ""; position: absolute; left: -4%; right: -4%; top: 12%; bottom: 0; z-index: -1; background: url("./stroke.png") center / contain no-repeat; opacity: .85; pointer-events: none; }
:root[data-theme="dark"] .ipad-stage::before { background-image: url("./stroke-dark.png"); opacity: .6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ipad-stage::before { background-image: url("./stroke-dark.png"); opacity: .6; } }
@media (max-width: 767px) { .ipad-stage::before { left: -30%; right: -30%; top: 20%; } }

/* Mobile Portfolio ID: more compact */
@media (max-width: 767px) {
  .memoji-slot { flex-basis: 52px; width: 52px; height: 52px; }
  .id-profile { gap: 10px; }
  .id-profile h3 { font-size: 18px; }
  .id-profile p { font-size: 11px; }
  .id-blurb { font-size: 12px; line-height: 1.4; }
  .id-quote { font-size: 14px; padding: 8px 10px; border-radius: 12px; }
  .id-details div { padding: 5px 8px; }
  .id-details dt { font-size: 9px; }
  .id-details dd { font-size: 11px; line-height: 1.3; }
  .id-categories { gap: 4px; }
  .id-categories span { padding: 3px 8px; font-size: 10px; }
  .id-socials { gap: 4px; }
  .id-socials a { min-height: 26px; padding: 0 8px; font-size: 11px; }
  .id-socials img { width: 12px; height: 12px; }
  .id-resume { min-height: 34px; font-size: 12px; padding: 0 12px; }
  .id-resume small { font-size: 10px; }
  .id-bottom { font-size: 9px; gap: 6px; padding-top: 8px; }
  .id-bottom b { padding: 3px 8px; font-size: 10px; }
  .id-body { padding: 12px; gap: 10px; }
  .id-left, .id-right { gap: 8px; }
}
@media (max-width: 767px) { .memoji-slot.photo-avatar { flex: 0 0 52px; min-width: 52px; overflow: hidden; } .memoji-slot.photo-avatar img { display: block; } }

/* Library: Front / Spines segmented control */
.library-head { position: relative; }
.shelf-toggle { display: inline-flex; gap: 2px; margin-top: 18px; padding: 3px; border-radius: 10px; background: var(--fill); }
.shelf-toggle button { min-width: 88px; min-height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--label); font-size: 13px; font-weight: 500; transition: background .25s, box-shadow .25s; }
.shelf-toggle button[aria-checked="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
.book-row.is-spines { gap: 4px; }
.book-row.is-spines .book { width: var(--spine-w, 44px); transition: width .45s var(--ease), transform .45s var(--ease); }
.book-row.is-spines .book-cover { padding: 12px 6px; border-radius: 4px 4px 2px 2px; flex-direction: column; align-items: center; justify-content: space-between; }
.book-row.is-spines .book-cover::after { display: none; }
.book-row.is-spines .book-title { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 78%; }
.book-row.is-spines .book-title::after { display: none; }
.book-row.is-spines .book-cover small { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 8px; white-space: nowrap; overflow: hidden; max-height: 20%; }
.book-row.is-spines .book.selected { transform: translateY(-14px); }
.book-row:not(.is-spines) .book-cover small, .book-row:not(.is-spines) .book-title { writing-mode: horizontal-tb; }
@media (min-width: 768px) { .book-row.is-spines { justify-content: center; } }
.ipad-stage { background: var(--grouped); }
.ipad-stage::before { left: 50%; top: 50%; right: auto; bottom: auto; width: min(1700px, 125vw); aspect-ratio: 2388 / 1668; transform: translate(-50%, -46%); background-size: contain; }
.ipad-stage .wrap { position: relative; z-index: 1; }
@media (max-width: 767px) { .ipad-stage::before { width: 190vw; } }
@media (max-width: 899px) {
  .ipad-stage { padding: 80px 0 32px; }
  .ipad-stage .wrap { width: calc(100% - 16px); }
  .ipad-stage .ipad { width: min(calc(100vw - 16px), calc((100svh - 110px) * .66), 520px); }
}
@media (max-width: 767px) {
  .window-photo .portrait-slot { height: 180px; padding-top: 34px; }
  .portrait-slot .portrait-memoji { height: 130px; max-width: 45%; }
}
.dock-app.is-art { background: none; box-shadow: none; overflow: visible; filter: drop-shadow(0 4px 8px rgba(3,54,96,.22)); }
.dock-app.is-art svg { width: 100%; height: 100%; }
/* Section tabs line up with the nav's left edge */
.case-tabs-inner { margin-left: calc((100% - min(88%, 1180px)) / 2); max-width: min(88%, 1180px); }
@media (max-width: 767px) { .case-tabs-inner { margin-left: 16px; max-width: calc(100% - 32px); } }
/* Home About: calmer hierarchy */
.about-title { margin: 10px 0 20px; color: var(--label); font: 500 clamp(34px, 3.2vw, 48px)/1.05 var(--heading); letter-spacing: -.03em; }
.about-feature p.about-statement { margin: 0 0 16px; color: var(--label); font: 400 clamp(19px, 1.55vw, 23px)/1.5 var(--body); letter-spacing: -.01em; }
.about-feature p.about-statement.is-secondary { color: var(--label-2); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.6; }
.about-highlight { font-weight: 500; }
@media (max-width: 767px) {
  .about-title { font-size: 30px; margin-bottom: 14px; }
  .about-feature p.about-statement { font-size: 17px; }
  .about-feature p.about-statement.is-secondary { font-size: 15px; }
}

/* Music widget: hover to play */
.w-music { position: relative; }
.w-music .music-art { transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.w-music.is-hover .music-art { transform: translateY(-3px) scale(1.06); box-shadow: 0 12px 24px rgba(0,0,0,.35); }
.w-music.is-hover .eq { opacity: 1; }
.w-music.is-hover .eq i { animation-play-state: running; }
.music-tap-hint { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 4px 10px; border-radius: 999px; background: #fff; color: #033660; font-size: 11px; font-weight: 600; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .3s var(--ease); pointer-events: none; }
.w-music.needs-tap .music-tap-hint { opacity: 1; transform: none; }

/* Song art uses the favicon */
.music-art img, .ipad-screen .music-art img { width: 62%; height: 62%; filter: none; }
/* Phone iPad: let the song title wrap instead of cutting off */
@media (max-width: 899px) {
  .ipad-screen .music-meta strong { white-space: normal; overflow: visible; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; line-height: 1.2; }
}
.music-meta strong { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }

/* Apple Music–style widget */
.w-music.am-widget { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 16px; border: 0; background: linear-gradient(160deg, #1f2a33, #0d1419); color: #fff; }
.am-head { display: flex; align-items: flex-start; justify-content: space-between; }
.am-widget .music-art { flex: 0 0 auto; width: 58%; height: auto; aspect-ratio: 1; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.am-widget .music-art img { width: 58%; height: 58%; }
.am-logo { width: 22px; height: 22px; }
.am-widget .music-meta { gap: 1px; }
.am-widget .widget-label { font-size: 10px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: #fa2d48; opacity: 1; }
.am-widget .music-meta strong { font-size: 14px; font-weight: 600; -webkit-line-clamp: 1; }
.am-widget .music-meta span:last-child { font-size: 12px; opacity: .6; display: block; }
.am-play { position: absolute; right: 14px; bottom: 14px; width: 32px !important; height: 32px !important; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.16) !important; color: #fff !important; box-shadow: none !important; }
.am-play:hover { background: rgba(255,255,255,.26) !important; }
.am-widget .music-meta { padding-right: 38px; }
@media (max-width: 899px) {
  .ipad-screen .am-widget { padding: 10px; gap: 4px; }
  .ipad-screen .am-widget .music-art { width: 52%; flex-basis: auto; height: auto; }
  .ipad-screen .am-widget .music-art img { width: 58%; height: 58%; }
  .ipad-screen .am-widget .music-meta strong { font-size: 12px; -webkit-line-clamp: 2; }
  .ipad-screen .am-widget .music-meta .widget-label, .ipad-screen .am-widget .music-meta span:last-child { display: block; font-size: 10px; }
  .ipad-screen .am-play { width: 26px !important; height: 26px !important; right: 8px; bottom: 8px; }
  .ipad-screen .am-logo { width: 16px; height: 16px; }
}
/* Mobile nav menu: solid enough to read over content */
@media (max-width: 767px) {
  .nav-tabs { background: rgba(255, 255, 255, .96); border-color: rgba(0, 0, 0, .06); box-shadow: 0 18px 40px rgba(3, 20, 36, .22); }
  .nav-tabs a { color: #0b1f33; }
  :root[data-theme="dark"] .nav-tabs { background: rgba(28, 28, 30, .96); border-color: rgba(255, 255, 255, .1); }
  :root[data-theme="dark"] .nav-tabs a { color: #f5f7fa; }
}
@media (max-width: 767px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-tabs { background: rgba(28, 28, 30, .96); border-color: rgba(255, 255, 255, .1); }
  :root:not([data-theme="light"]) .nav-tabs a { color: #f5f7fa; }
}
@media (max-width: 767px) {
  .nav-tabs { -webkit-backdrop-filter: none; backdrop-filter: none; background: #ffffff; }
  :root[data-theme="dark"] .nav-tabs { background: #1c1c1e; }
}
@media (max-width: 767px) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-tabs { background: #1c1c1e; } }

/* Album art: real photo fills the tile */
.am-widget .music-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.am-widget .music-art { background: none; }
@media (max-width: 899px) {
  .ipad-screen .am-widget .music-art img { width: 100%; height: 100%; object-fit: cover; }
}

/* Shelf toggle: small icon switch tucked in the shelf's corner */
.reading-library { position: relative; }
.shelf-toggle { position: absolute; z-index: 3; right: max(16px, calc((100vw - min(88vw, 1280px)) / 2 - (100vw - 100%) / 2)); margin-top: 0; top: calc(100% - 100%); gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--separator); box-shadow: 0 4px 14px rgba(3,54,96,.1); }
.shelf-toggle button { min-width: 0; width: 32px; height: 28px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 999px; color: var(--label-3); transition: background .25s, color .25s, transform .3s var(--ease); }
.shelf-toggle button:hover { color: var(--label); }
.shelf-toggle button:active { transform: scale(.9); }
.shelf-toggle button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 6px rgba(7,120,154,.35); }
.shelf-toggle { right: 0; top: auto; bottom: -46px; }
@media (max-width: 767px) { .shelf-toggle { bottom: -40px; } }

/* Toggle sits on the same row as the library title */
.library-title-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 10px; }
.library-title-row h3 { margin-top: 0; }
.library-title-row .shelf-toggle { position: static; justify-self: end; margin: 0; }
@media (max-width: 767px) {
  .library-title-row { grid-template-columns: 1fr auto; }
  .library-title-row > span:first-child { display: none; }
}
@media (max-width: 767px) { .library-title-row { align-items: start; } .library-title-row .shelf-toggle { margin-top: 4px; } }

/* ---------- Projects: more breathing room ---------- */
#work.section, #explorations.section { padding-block: 120px; }
#work .section-head, #explorations .section-head { margin-bottom: 48px; }
.grid { gap: 36px 32px; }
.project { padding: 12px 12px 22px; }
.project-body { gap: 6px; padding: 20px 10px 0; }
.project .tags { margin-top: 12px; }
.work-grid { padding-block: 48px 120px; }
.work-subhead { padding-top: 24px; }
.work-subhead h2 { margin-bottom: 32px; }
@media (max-width: 767px) {
  #work.section, #explorations.section { padding-block: 72px; }
  .grid { gap: 24px; }
}

.extra-thumb.is-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 0; padding: 0; background: var(--fill); }

/* Hero copy hierarchy: role (label) → name (H1) → tagline → actions → meta */
.hero-copy-v2 { justify-content: center; gap: 0; }
.hero-copy-v2 .hero-role { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero .hero-copy-v2 .hero-name { margin: 10px 0 0; color: var(--label); font: 600 clamp(38px, 3.5vw, 54px)/1.02 var(--heading); letter-spacing: -.035em; }
.hero-copy-v2 .hero-tagline { margin: 14px 0 0; color: var(--label-2); font: 500 clamp(20px, 1.7vw, 26px)/1.25 var(--heading); letter-spacing: -.015em; }
.hero-copy-v2 .hero-tagline span { background: linear-gradient(95deg, #07789a, #2ab3d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy-v2 .hero-actions { flex-wrap: nowrap; gap: 10px; margin-top: 28px; }
.hero-copy-v2 .hero-actions .button { flex: 0 0 auto; min-height: 46px; padding: 0 22px; font-size: 15px; }
.hero-copy-v2 .hero-meta { margin-top: 18px; }
:root[data-theme="dark"] .hero-copy-v2 .hero-tagline span { background-image: linear-gradient(95deg, #5ac8fa, #9be7ff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-copy-v2 .hero-tagline span { background-image: linear-gradient(95deg, #5ac8fa, #9be7ff); } }
@media (max-width: 767px) {
  .hero-copy-v2 .hero-role { font-size: 11px; }
  .hero .hero-copy-v2 .hero-name { font-size: clamp(28px, 8.4vw, 34px); margin-top: 6px; }
  .hero-copy-v2 .hero-tagline { font-size: 17px; margin-top: 8px; }
  .hero-copy-v2 .hero-actions { margin-top: 16px; gap: 8px; }
  .hero-copy-v2 .hero-actions .button { flex: 1 1 0; min-height: 42px; padding: 0 10px; font-size: 14px; }
}
.hero .hero-copy-v2 .hero-name { font-weight: 500; letter-spacing: -.03em; }


/* Library toggle: centred under the title block */
.shelf-toggle-row { display: flex; justify-content: center; margin-top: 18px; }
.shelf-toggle-row .shelf-toggle { position: static; margin: 0; }
@media (max-width: 767px) { .library-head { text-align: center; } .library-head p { margin-inline: auto; } }

/* Work: explorations in a horizontal scroller */
.extras-grid { display: flex; gap: 16px; overflow-x: auto; margin-inline: calc(50% - 50vw); padding: 4px calc(50vw - 50%) 28px; scroll-snap-type: x proximity; scroll-padding-inline: calc(50vw - 50%); scrollbar-width: none; overscroll-behavior-x: contain; }
.extras-grid::-webkit-scrollbar { display: none; }
.extras-grid .extra-card { flex: 0 0 280px; scroll-snap-align: start; }
.see-all-card { justify-content: center; background: radial-gradient(360px 220px at 100% 0%, rgba(94,208,240,.35), transparent 60%), linear-gradient(150deg, #0a4775, #033660) !important; color: #fff; }
.see-all-card .eyebrow { color: #b8eaf6; }
.see-all-card h3 { color: #fff; font-size: 22px; }
.see-all-card p { color: rgba(255,255,255,.78) !important; }
.see-all-card .extra-cta { color: #b8eaf6; }
@media (max-width: 767px) { .extras-grid { padding-inline: 16px; scroll-padding-inline: 16px; } .extras-grid .extra-card { flex-basis: 240px; } .extras-grid .extra-card p { display: block; } }
.extras-grid { margin-inline: auto; padding: 4px 0 28px; scroll-padding-inline: 0; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
@media (max-width: 767px) { .extras-grid { padding-inline: 0; } }

/* Work explorations: small cards + header controls */
.extras-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.extras-head h2 { margin-bottom: 20px !important; }
.extras-head .cut-nav { margin-bottom: 24px; }
.extras-grid { gap: 12px; }
.extras-grid .extra-card { flex: 0 0 210px; gap: 4px; padding: 10px 10px 14px; border-radius: 18px; }
.extras-grid .extra-thumb, .extras-grid .extra-thumb.is-image { aspect-ratio: 4 / 3; height: auto; margin-bottom: 6px; border-radius: 12px; }
.extras-grid .extra-card h3 { font-size: 14px; line-height: 1.25; padding-inline: 2px; }
.extras-grid .extra-card p { display: none !important; }
.extras-grid .extra-card .extra-cta { font-size: 12px; padding-inline: 2px; }
.extras-grid .extra-card:not(:has(.extra-thumb)) { justify-content: flex-start; }
.extras-grid .extra-card:not(:has(.extra-thumb))::before { content: ""; display: block; aspect-ratio: 4 / 3; margin-bottom: 6px; border-radius: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h7l4 4v13H6v-17z'/%3E%3Cpath d='M14 3.5V8h4M9 13h6M9 16.5h4'/%3E%3C/svg%3E") center / 40px no-repeat, linear-gradient(150deg, #2ab3d6, #07789a); }
@media (max-width: 767px) { .extras-head .cut-nav { margin: 0 0 16px; } .extras-grid .extra-card { flex-basis: 180px; } }
@media (hover: none) { .extras-head .cut-arrow { display: grid; } }
.experience-logo.is-brand { padding: 2px; object-fit: contain; background: #fff; }

.id-resume { cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s; }
.id-resume:hover { background: rgba(255,255,255,.12); border-style: solid; }

/* Library detail CTA: never squeezed or wrapped by long titles */
.reading-detail > div { flex: 1 1 auto; min-width: 0; }
.reading-detail h4 { line-height: 1.15; text-wrap: balance; }
.reading-detail .button { flex: 0 0 auto; align-self: center; white-space: nowrap; min-height: 46px; padding: 0 22px; gap: 8px; line-height: 1; }
@media (max-width: 767px) {
  .reading-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
  .reading-detail h4 { font-size: 22px; }
  .reading-detail .button { align-self: stretch; margin-top: 0; }
}

/* Contact buttons: five items, and no backdrop blur (iOS Safari can drop it entirely) */
.socials { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.socials a { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .26); -webkit-transform: translateZ(0); }
.socials a img { display: block; flex: 0 0 auto; }
@media (max-width: 767px) {
  .socials { grid-template-columns: 1fr 1fr; }
  .socials a.is-whatsapp { grid-column: 1 / -1; }
}

/* Portfolio ID contact links: rounded squares, like the footer contact buttons */
.id-socials a { border-radius: 12px; }
@media (max-width: 767px) { .id-socials a { border-radius: 10px; } }

/* Portfolio ID: resume plus one contact button */
.id-contact { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 0 16px; border-radius: 12px; background: #fff; color: #033660; font-size: 14px; font-weight: 600; transition: transform .3s var(--ease); }
.id-contact:hover { transform: translateY(-2px); }
.id-resume { border-radius: 12px; }

/* Resume download under the experience list */
.experience-resume { display: flex; justify-content: center; margin-top: 36px; }
.experience-resume .button span { color: inherit; opacity: .72; font-size: 13px; font-weight: 600; }

/* Case study: full-screen hero video, back button instead of the site nav */
.case-hero { padding: 0; }
.case-hero-media { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.case-back { position: fixed; z-index: 30; top: clamp(14px, 2.4vh, 24px); left: max(16px, calc((100vw - 1240px) / 2)); display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--card); color: var(--label); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-card); transition: transform .3s var(--ease); }
.case-back:hover { transform: translateX(-2px); }

/* More projects carousel at the end of a case study */
.case-more-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.case-more-head h2 { font-size: clamp(28px, 4vw, 40px); }
.case-next { display: block; margin-top: 88px; }
.case-more-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.case-more-rail::-webkit-scrollbar { display: none; }
.case-more-card { scroll-snap-align: start; display: grid; gap: 6px; padding: 12px; border-radius: 22px; background: var(--card-alt); transition: transform .35s var(--ease); }
.case-more-card:hover { transform: translateY(-4px); }
.case-more-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.case-more-name { font: 500 21px/1.15 var(--heading); }
.case-more-card small { color: var(--label-2); font-size: 13px; }
@media (max-width: 767px) {
  .case-back { top: 10px; left: 10px; min-height: 38px; font-size: 14px; }
  .case-more-rail { grid-auto-columns: 78%; }
  .case-next { margin-top: 56px; }
}

/* Back button rides in the section-tabs row */
.case-tabs { display: flex; align-items: center; gap: 10px; }
.case-tabs .case-back { position: static; flex: 0 0 auto; pointer-events: auto; width: 42px; min-height: 42px; padding: 0; justify-content: center; border-radius: 999px; margin-left: max(16px, calc((100vw - 1240px) / 2)); }
.case-tabs .case-tabs-inner { margin-left: 0; }
@media (max-width: 767px) {
  .case-tabs .case-back { width: 38px; min-height: 38px; margin-left: 10px; }
}

/* Tab bar floats at the top of the screen; over the hero it shows back and menu only */
.case-tabs { position: fixed; top: 14px; left: 0; right: 0; margin: 0; }
.case-tabs.is-hero .case-tab { max-width: 0; padding-inline: 0; opacity: 0; pointer-events: none; }
.case-tabs.is-hero .case-tabs-inner { gap: 0; }
@media (max-width: 767px) { .case-tabs { top: 10px; } }

/* Dark mode: Featured Work cards were grey on near-black navy. Tint them blue and deepen the band. */
:root[data-theme="dark"] #work { --band: linear-gradient(180deg, #04182b, #010d19); }
:root[data-theme="dark"] #work .project { background: #0e2438; box-shadow: 0 0 0 .5px rgba(143, 220, 240, .16), 0 18px 44px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] #work .project .tags span { background: rgba(143, 220, 240, .12); color: #cfeaf6; }
:root[data-theme="dark"] #work .cover.has-image { background: #0a1c2c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #work { --band: linear-gradient(180deg, #04182b, #010d19); }
  :root:not([data-theme="light"]) #work .project { background: #0e2438; box-shadow: 0 0 0 .5px rgba(143, 220, 240, .16), 0 18px 44px rgba(0, 0, 0, .5); }
  :root:not([data-theme="light"]) #work .project .tags span { background: rgba(143, 220, 240, .12); color: #cfeaf6; }
  :root:not([data-theme="light"]) #work .cover.has-image { background: #0a1c2c; }
}
