/* ==========================================================================
   Danil Karaimchuk — portfolio
   Simple pages, one reading column, quiet iOS details.
   Tokens first: colors / fonts / sizes live here.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --panel: #141415;
  --panel-2: #1c1c1e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ededeb;
  --text-2: #b9b9b5;
  --muted: #8a8a87;
  --faint: #5c5c58;
  --ok: #7fd18b;

  --gutter: 20px;
  --col: 640px;      /* reading column */
  --wide: 1080px;    /* images, grids, tables */
  --r: 14px;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* iOS-like springs (generated from a damped spring) */
  --spring-bounce: linear(0, 0.0336, 0.1191, 0.236, 0.3677, 0.5017, 0.6286, 0.7426, 0.84, 0.9194, 0.9811, 1.0261, 1.0564, 1.0744, 1.0825, 1.083, 1.078, 1.0695, 1.0591, 1.0479, 1.0369, 1.0267, 1.0177, 1.0103, 1.0043, 0.9998, 0.9966, 0.9945, 0.9934, 0.993, 0.9932, 0.9938, 0.9946, 0.9955, 0.9964, 0.9973, 1);
  --spring: linear(0, 0.0217, 0.0773, 0.1546, 0.2441, 0.3386, 0.4327, 0.5227, 0.6061, 0.6814, 0.7478, 0.8052, 0.8539, 0.8944, 0.9275, 0.9538, 0.9744, 0.9901, 1.0016, 1.0097, 1.015, 1.0181, 1.0196, 1.0199, 1.0193, 1.018, 1.0164, 1.0146, 1.0127, 1.0108, 1.0091, 1.0074, 1.006, 1.0047, 1.0036, 1.0027, 1);

  /* frosted glass */
  --glass-blur: blur(24px) saturate(180%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid #0a84ff; outline-offset: 2px; border-radius: 6px; }

.col, .wide { width: 100%; margin-inline: auto; padding-inline: var(--gutter); }
.col { max-width: calc(var(--col) + 2 * var(--gutter)); }
.wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }
main { padding-top: clamp(40px, 9vh, 88px); }

.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.dim { color: var(--muted); }
.link-u { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.link-u:hover { background-size: 100% 1px; }
.todo { box-shadow: inset 0 -1px 0 rgba(255, 196, 0, 0.55); background: rgba(255, 196, 0, 0.06); }
.avail { display: inline-flex; align-items: center; gap: 8px; }
.avail::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(127, 209, 139, 0.15); }

.stage { background: var(--bg); min-height: 100vh; }

/* ---------- top bar: breadcrumb + iOS-style blurred bar on scroll ---------- */
.topbar { position: sticky; top: 0; z-index: 60; }
.topbar__in {
  height: 56px; display: flex; align-items: center; gap: 10px;
  padding: 0 14px 0 10px;
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s;
}
.topbar.is-scrolled .topbar__in {
  background: rgba(10, 10, 10, 0.62);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom-color: var(--line);
}
.menu-btn, .menu-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2);
  transition: background .2s, color .2s, transform .5s var(--spring-bounce);
}
.menu-btn:hover, .menu-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.menu-btn:active, .menu-close:active { transform: scale(0.88); }
.path { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; }
.path a { color: var(--text); transition: color .2s; }
.path a:hover { color: var(--muted); }
.path__sep { color: var(--faint); font-weight: 400; }
.path__title { overflow: hidden; text-overflow: ellipsis; }
/* iOS large title → inline title */
.path__late { opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .5s var(--spring); }
.topbar.show-title .path__late { opacity: 1; transform: none; }
.only-mob-i { display: none; }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a {
  height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px;
  font-size: 14px; color: var(--muted); transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.topbar__right { margin-left: 10px; display: flex; align-items: center; gap: 18px; font-size: 13px; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 721px) {
  .topbar .menu-btn { display: none; }
  .topbar__in { padding-left: 20px; }
}
.btn-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .5s var(--spring-bounce);
}
.btn-pill:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-pill:active { transform: scale(0.94); }

/* ---------- menu: a glass sheet from the left ---------- */
.sheet-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
body.menu-open .sheet-scrim { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; z-index: 95; top: 8px; left: 8px; bottom: 8px;
  width: min(300px, calc(100vw - 16px));
  display: flex; flex-direction: column; padding: 10px;
  border-radius: 22px;
  background: rgba(28, 28, 30, 0.72);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateX(calc(-100% - 24px));
  visibility: hidden;
  transition: transform .7s var(--spring), visibility 0s linear .7s;
}
body.menu-open .menu { transform: none; visibility: visible; transition: transform .7s var(--spring), visibility 0s; }
.menu__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 6px 2px 14px 10px; }
.menu__me { font-size: 14px; font-weight: 600; line-height: 1.35; }
.menu__me small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.menu-close { width: 32px; height: 32px; font-size: 13px; }
.menu__group + .menu__group { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.menu__label { padding: 4px 10px 6px; font-size: 12px; color: var(--faint); }
.menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 38px; padding: 0 10px; border-radius: 10px;
  font-size: 14px; color: var(--text-2);
  opacity: 0; transform: translateX(-10px);
  transition: background .15s, color .15s, opacity .3s var(--ease), transform .6s var(--spring);
}
body.menu-open .menu a { opacity: 1; transform: none; transition-delay: 0s, 0s, calc(var(--i) * 22ms + 90ms), calc(var(--i) * 22ms + 90ms); }
.menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.menu__ext { color: var(--faint); font-size: 12px; }
.menu__foot { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; padding: 10px; font-size: 12px; color: var(--muted); }

/* dynamic-island message */
.island {
  position: fixed; z-index: 130; top: 10px; left: 50%; translate: -50% 0;
  height: 36px; padding: 0 16px; border-radius: 999px; display: flex; align-items: center;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0; scale: 0.5; pointer-events: none;
  transition: opacity .25s, scale .35s var(--ease);
}
.island.is-on { opacity: 1; scale: 1; transition: opacity .2s, scale .7s var(--spring-bounce); }

/* ---------- page head ---------- */
.page-head { margin-bottom: 36px; }
.page-title { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
.page-intro { margin: 10px 0 0; font-size: 17px; line-height: 1.5; color: var(--text-2); max-width: 58ch; }
.page-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* iOS segmented control */
.seg {
  position: relative; display: inline-flex; max-width: 100%; padding: 2px; border-radius: 10px;
  background: rgba(118, 118, 128, 0.24); overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__thumb {
  position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 8px;
  background: #636366; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  transition: transform .55s var(--spring-bounce), width .55s var(--spring-bounce);
}
.seg.no-anim .seg__thumb { transition: none; }
.seg button { position: relative; z-index: 1; flex: none; height: 30px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); transition: color .25s, transform .4s var(--spring-bounce); }
.seg button[aria-pressed="true"] { color: #fff; }
.seg button:active { transform: scale(0.95); }

/* ---------- lists (home, about) ---------- */
.intro__avatar {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden; position: relative;
  display: grid; place-items: center; font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  background: radial-gradient(120% 120% at 20% 10%, #ff9a5a, #ff7a2f 40%, #7a2e10 100%);
}
.intro__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro__name { margin: 20px 0 0; font-size: 16px; font-weight: 600; }
.intro__bio { margin: 6px 0 0; font-size: clamp(19px, 2.4vw, 22px); line-height: 1.38; font-weight: 500; letter-spacing: -0.018em; }
.intro__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.intro__meta a:hover { color: var(--text); }

.sec { margin-top: 52px; }
.sec__label { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sec__label a { display: inline-flex; align-items: center; gap: 4px; transition: color .2s; }
.sec__label a:hover { color: var(--text); }
.sec__label .chev { transition: transform .4s var(--spring-bounce); }
.sec__label a:hover .chev { transform: translateX(3px); }

.rows { list-style: none; margin: 0 -10px; padding: 0; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 7px 10px; border-radius: 12px;
  transition: background .15s, transform .4s var(--spring-bounce);
}
a.row:hover { background: rgba(255, 255, 255, 0.05); }
a.row:active { transform: scale(0.985); }
.row__text { flex: 1; min-width: 0; }
.row__title { font-weight: 500; }
.row__desc { color: var(--muted); }
.row__title + .row__desc { margin-left: 8px; }
.row__meta { flex: none; font-size: 13px; color: var(--faint); }
.row__go { flex: none; color: var(--faint); transition: color .2s, transform .45s var(--spring-bounce); }
a.row:hover .row__go { color: var(--text); transform: translateX(3px); }
.row .app-icon { --s: 28px; }

/* main case on the home page */
.feature { display: block; }
.feature__frame { aspect-ratio: 16 / 10; transition: transform .5s var(--spring-bounce); }
.feature__frame { background: radial-gradient(80% 70% at 50% 100%, color-mix(in oklab, var(--cover-accent) 30%, transparent), transparent 70%), var(--panel); }
.feature:active .feature__frame { transform: scale(0.985); }
/* phones start near the top and run off the bottom edge */
.feature__shots { position: absolute; top: 14%; left: 7%; right: 7%; display: flex; justify-content: center; align-items: flex-start; gap: 4%; }
.feature__shots img {
  width: 32%; height: auto; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  transition: transform .7s var(--spring-bounce);
}
.feature__shots img:nth-child(2) { transform: translateY(-4%); }
.feature:hover .feature__shots img:nth-child(1) { transform: translateY(-3%) rotate(-2deg); }
.feature:hover .feature__shots img:nth-child(2) { transform: translateY(-8%); }
.feature:hover .feature__shots img:nth-child(3) { transform: translateY(-3%) rotate(2deg); }
.feature__cap { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.feature__title { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.feature__desc { display: block; color: var(--text-2); }
.feature__meta { display: block; margin-top: 4px; font-size: 13px; color: var(--faint); }
.feature:hover .arrow-btn { background: var(--text); color: var(--bg); transform: translateX(4px); }

/* key → value rows */
.kv { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.kv li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv small { display: block; color: var(--muted); font-size: 14px; }
.kv .kv__r { color: var(--muted); text-align: right; flex: none; }

/* ---------- app icons (iOS squircle) ---------- */
.app-icon {
  --s: 56px; --c: #3a3a3c;
  position: relative; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * 0.2237);
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(165deg, color-mix(in oklab, var(--c) 78%, #fff) 0%, var(--c) 48%, color-mix(in oklab, var(--c) 78%, #000) 100%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2), 0 8px 20px -10px color-mix(in oklab, var(--c) 70%, transparent);
  color: #fff; font-weight: 600; font-size: calc(var(--s) * 0.36); letter-spacing: -0.04em; line-height: 1;
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-icon b { font-weight: 600; }

/* ---------- media frames ---------- */
.cover { position: absolute; inset: 0; overflow: hidden; background: var(--cover-bg, var(--panel)); }
.cover.only-mob { display: none; }
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover--contain { display: grid; grid-template: minmax(0, 100%) / minmax(0, 100%); place-items: center; padding: var(--pad, 7%); }
.cover--contain .cover__img {
  position: static; width: auto; height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.ph { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 110%, color-mix(in oklab, var(--cover-accent) 26%, transparent), transparent 70%); }
.ph-device { position: absolute; left: 50%; translate: -50% 0; bottom: -2%; }
.ph-phone {
  width: clamp(90px, 24%, 170px); aspect-ratio: 9 / 19.5; border-radius: 20px;
  background: #0c0c0c; border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 9px 9px; display: flex; flex-direction: column; gap: 6px;
}
.ph-browser {
  width: 74%; aspect-ratio: 16 / 10; border-radius: 8px 8px 0 0;
  background: #0c0c0c; border: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 0;
  padding: 22px 10px 10px; display: grid; grid-template-columns: 1fr 2.4fr; gap: 8px;
}
.ph-bar { height: 7px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); }
.ph-bar.w40 { width: 40%; } .ph-bar.w60 { width: 60%; } .ph-bar.w80 { width: 80%; }
.ph-block { flex: 1; border-radius: 6px; background: rgba(255, 255, 255, 0.05); }
.ph-block.accent { background: color-mix(in oklab, var(--cover-accent) 32%, #141414); }
.ph-col { display: flex; flex-direction: column; gap: 6px; }
.ph-label { position: absolute; top: 14px; right: 14px; z-index: 2; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 196, 0, 0.75); }

.frame { position: relative; border-radius: var(--r); overflow: hidden; background: var(--panel); }
.frame .cover { background: radial-gradient(70% 90% at 50% 120%, color-mix(in oklab, var(--cover-accent) 20%, transparent), transparent 70%), var(--panel); }
.glass-chip {
  position: absolute; z-index: 3; top: 12px; left: 12px;
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(28, 28, 30, 0.45);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92); font-size: 12px; font-weight: 500;
}

/* ---------- work grid ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
.card { display: block; min-width: 0; }
.card--big { grid-column: 1 / -1; }
.card .frame { aspect-ratio: 4 / 3; transition: transform .5s var(--spring-bounce); }
.card--big .frame { aspect-ratio: 21 / 9; }
.card--big .frame .cover--contain { --pad: 4.5% 4%; }
.card .frame .cover { transition: transform 1s var(--ease); }
.card:hover .frame .cover { transform: scale(1.02); }
.card:active .frame { transform: scale(0.985); }
.card__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 12px; }
.card__title { font-weight: 500; }
.card__desc { display: block; color: var(--muted); }
.card__meta { flex: none; font-size: 13px; color: var(--faint); }
.cards .is-hidden { display: none; }

/* ---------- case page ---------- */
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.eyebrow a:hover { color: var(--text); }
.case-tagline { margin: 10px 0 0; font-size: 18px; line-height: 1.45; color: var(--text-2); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 28px 0 0; }
.facts div { padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--faint); }
.facts dd { margin: 2px 0 0; font-size: 14px; }
.case-cover { margin-top: 40px; aspect-ratio: 21 / 9; }
.case-cover .cover--contain { --pad: 4.5% 4%; }

.blk { margin-top: clamp(56px, 9vh, 88px); }
.blk__label { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.blk__label b { font-family: var(--font-mono); font-weight: 400; color: var(--faint); }
.blk__title { margin: 0 0 12px; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.prose { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--text); font-weight: 500; }
.prose .serif { color: var(--text); font-size: 1.12em; }
.prose h2 { margin: 44px 0 10px; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }

.fig { margin: 0; }
.fig figcaption, .gallery figcaption, .compare figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.plate { border-radius: var(--r); background: var(--panel); padding: clamp(16px, 4vw, 48px); }
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); }
.gallery .frame, .compare .frame { aspect-ratio: var(--ratio, 9 / 16); border-radius: 8px; }
.gallery .frame .cover, .compare .frame .cover { background: var(--panel-2); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 40px); max-width: 620px; margin: 0 auto; }
.compare figcaption b { display: block; font-weight: 500; color: var(--text); }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric { padding: 18px; border-radius: 12px; background: var(--panel); }
.metric__value { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.05; font-weight: 500; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.metric__label { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }

.decisions { list-style: none; margin: 0; padding: 0; counter-reset: d; }
.decision { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.decision__n { font-family: var(--font-mono); font-size: 12px; color: var(--faint); padding-top: 3px; }
.decision h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.decision p { margin: 0; color: var(--muted); font-size: 15px; }

.story { margin: 0; }
.story div { padding: 16px 0; border-top: 1px solid var(--line); }
.story dt { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.story dd { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-2); }

.pullquote { margin: 0; padding-left: 18px; border-left: 2px solid var(--line-strong); }
.pullquote p { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(24px, 3vw, 30px); line-height: 1.25; }
.pullquote cite { display: block; margin-top: 12px; font-style: normal; font-size: 13px; color: var(--muted); }

.next {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: clamp(72px, 12vh, 120px); padding: 18px 0; border-top: 1px solid var(--line);
}
.next__k { font-size: 13px; color: var(--muted); }
.next__t { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.arrow-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: background .25s, color .25s, transform .5s var(--spring-bounce); }
.next:hover .arrow-btn { background: var(--text); color: var(--bg); transform: translateX(4px); }

/* ---------- stack ---------- */
.st-head, .st-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) 104px 18px; gap: 16px; align-items: center; }
.st-head { padding: 0 10px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.st-row { min-height: 58px; padding: 10px; border-bottom: 1px solid var(--line); transition: background .15s; }
a.st-row:hover { background: rgba(255, 255, 255, 0.035); }
.st-name { display: flex; align-items: center; gap: 12px; font-weight: 500; min-width: 0; }
.st-name .app-icon { --s: 32px; transition: transform .5s var(--spring-bounce); }
a.st-row:hover .app-icon { transform: scale(1.08) rotate(-4deg); }
.st-desc { color: var(--muted); }
.st-go { color: var(--faint); transition: color .2s, transform .4s var(--spring-bounce); }
a.st-row:hover .st-go { color: var(--text); transform: translate(2px, -2px); }
.chip {
  justify-self: start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--chip, #8e8e93); background: color-mix(in oklab, var(--chip, #8e8e93) 16%, transparent);
}
.st-row.is-hidden { display: none; }

/* ---------- comparison table (research) ---------- */
.tbl-wrap { margin-top: 28px; border-radius: var(--r); background: var(--panel); padding: 6px 22px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.tbl th { padding: 14px 16px 12px 0; text-align: left; vertical-align: bottom; font-size: 12px; font-weight: 500; color: var(--faint); border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px 16px 14px 0; vertical-align: top; color: var(--text-2); border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { color: var(--text); font-weight: 500; width: 20%; }
.tbl td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.tbl td:last-child { width: 30%; }
.blk__sub { margin: 0 0 6px; font-size: 15px; font-weight: 600; }

/* ---------- about & home cards ---------- */
.about-lead { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 500; letter-spacing: -0.015em; }
.about-lead .dim { color: var(--muted); }
.about-photo { width: 100%; max-width: 280px; aspect-ratio: 4 / 5; margin-bottom: 28px; }
.icon-stack { display: flex; }
.icon-stack .app-icon { --s: 28px; box-shadow: 0 0 0 2px var(--bg); transition: transform .5s var(--spring-bounce); }
.icon-stack .app-icon + .app-icon { margin-left: -6px; }
a.row:hover .icon-stack .app-icon { transform: translateX(calc(var(--k, 0) * 3px)); }

/* ---------- footer ---------- */
.footer { margin-top: clamp(96px, 16vh, 160px); padding: 28px 0 36px; border-top: 1px solid var(--line); }
.footer__label { font-size: 13px; font-weight: 500; color: var(--muted); }
.footer__line { margin: 8px 0 0; font-size: clamp(20px, 2.6vw, 24px); line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; }
.mail { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 16px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 56px; font-size: 13px; color: var(--faint); }
.footer__base a:hover { color: var(--text); }

/* ---------- app-launch zoom ---------- */
.zoom-ghost { position: fixed !important; z-index: 120; margin: 0 !important; pointer-events: none; overflow: hidden; transform: none !important; clip-path: none !important; opacity: 1 !important; }
.zoom-ghost .glass-chip, .zoom-ghost b { opacity: 0; transition: opacity .15s; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
[data-split] .w { display: inline-block; }
[data-split]:not(.is-in) .w { opacity: 0; }
[data-split].is-in .w { animation: word-in 1s var(--spring) both; animation-delay: calc(var(--i) * 30ms + var(--delay, 0ms)); }
@keyframes word-in {
  from { opacity: 0; filter: blur(10px); transform: translateY(0.45em); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
.frame.reveal { clip-path: inset(4% 2% 0 2% round var(--r)); transition: opacity .9s var(--ease), transform .9s var(--ease), clip-path 1.3s var(--ease); }
.frame.reveal.is-in { clip-path: inset(0 round var(--r)); }
[data-parallax] .cover__img { will-change: transform; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  main { padding-top: 28px; }
  .topbar__in { padding: 0 10px 0 6px; }
  .only-desk-i { display: none; }
  .only-mob-i { display: inline; }
  .nav { display: none; }
  .topbar__right { margin-left: auto; }
  .cover.only-desk { display: none; }
  .cover.only-mob { display: grid; }
  .row { align-items: flex-start; }
  .row .app-icon { margin-top: 2px; }
  .row__title + .row__desc { display: block; margin-left: 0; }
  .row__meta, .row__go { padding-top: 2px; }
  .cards { grid-template-columns: 1fr; gap: 28px; }
  .card--big .frame, .case-cover { aspect-ratio: 4 / 3; }
  .card--big .frame .cover--contain, .case-cover .cover--contain { --pad: 6%; }
  .page-tools { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-head { display: none; }
  .st-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
  .st-desc { grid-column: 1 / -1; padding-left: 44px; font-size: 14px; }
  .st-go { display: none; }
  .chip { grid-row: 1; grid-column: 2; justify-self: end; margin-top: 5px; }
  .island { top: 8px; }
  /* the table becomes a stack of cards */
  .tbl-wrap { padding: 4px 16px; }
  .tbl thead { display: none; }
  .tbl tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; width: auto !important; padding: 3px 0; border: 0; white-space: normal !important; }
  .tbl td::before { content: attr(data-label); font-size: 12px; font-weight: 400; color: var(--faint); padding-top: 2px; }
  .tbl td:first-child { display: block; font-size: 15px; margin-bottom: 4px; }
  .tbl td:first-child::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  [data-split] .w { opacity: 1 !important; }
  .frame.reveal { clip-path: none !important; }
}
