/* Matthew Mascuñana · portfolio
   Black and white, with ScrapNote's design language: Kumbh Sans, soft gray cards that lift,
   pill buttons, dotted blocks behind the showcase pieces. Light / dark follow the device;
   the header button overrides it. Project demos keep their own real colors. */

/* ---------------------------------------------------------------------------
   Colors
   --------------------------------------------------------------------------- */
:root {
  --bg: #FFFFFF;
  --card: #F2F2F2;
  --card-2: #E7E7E7;
  --divider: #DEDEDE;
  --line: #C6C6C6;
  --text: #0A0A0A;
  --text-2: #565656;
  --muted: #8C8C8C;
  --ink: #0A0A0A;
  --on-ink: #FFFFFF;
  --mark: #E0E0E0;
  --dot: rgba(0, 0, 0, 0.22);
  --frame: #111111;
  --frame-edge: #2C2C2C;
  --footer: #F2F2F2;
  --phone-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.45), 0 24px 40px -24px rgba(0, 0, 0, 0.35);
  --lift-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.28);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1B1B1B;
    --card-2: #262626;
    --divider: #2E2E2E;
    --line: #474747;
    --text: #FFFFFF;
    --text-2: #B3B3B3;
    --muted: #707070;
    --ink: #FFFFFF;
    --on-ink: #000000;
    --mark: #3A3A3A;
    --dot: rgba(255, 255, 255, 0.2);
    --frame: #1A1A1A;
    --frame-edge: #4A4A4A;
    --footer: #0E0E0E;
    --phone-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9);
    --lift-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1B1B1B;
  --card-2: #262626;
  --divider: #2E2E2E;
  --line: #474747;
  --text: #FFFFFF;
  --text-2: #B3B3B3;
  --muted: #707070;
  --ink: #FFFFFF;
  --on-ink: #000000;
  --mark: #3A3A3A;
  --dot: rgba(255, 255, 255, 0.2);
  --frame: #1A1A1A;
  --frame-edge: #4A4A4A;
  --footer: #0E0E0E;
  --phone-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9);
  --lift-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
* { box-sizing: border-box; }
:root { --gutter: 16px; --ease: cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (min-width: 560px) { :root { --gutter: 24px; } }
@media (min-width: 768px) { :root { --gutter: 48px; } }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Kumbh Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
a { color: var(--text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.sprite { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.section { width: calc(100% - 2 * var(--gutter)); max-width: 1180px; margin: 0 auto; }

.label {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 10px;
}
.h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.8px;
  margin: 0 0 16px;
}
.lead { color: var(--text-2); font-size: 16px; max-width: 560px; margin: 0 0 32px; }
.mark {
  background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%);
  padding: 0 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.todo { border-bottom: 1.5px dashed var(--muted); }
.note { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 30; transition: background 0.2s; }
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.header-inner {
  width: calc(100% - 2 * var(--gutter));
  max-width: 1180px;
  margin: 0 auto;
  height: 76px;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.6px;
  white-space: nowrap;
}
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand .dot { color: var(--muted); }
.site-nav { display: flex; gap: 4px; justify-content: center; }
.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover, .site-nav a.on { color: var(--text); background: var(--card); }
.header-actions { flex: 1 1 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.2s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--card); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 19px; height: 19px; fill: var(--text); }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.menu-btn { display: none; }
.mobile-nav {
  display: none;
  position: fixed;
  inset: 66px 0 auto 0;
  z-index: 29;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  padding: 8px var(--gutter) 20px;
}
.mobile-nav a { display: block; padding: 12px 4px; font-weight: 700; font-size: 17px; text-decoration: none; border-bottom: 1px solid var(--divider); }
.mobile-nav a:last-child { border-bottom: 0; }
body.menu-open .mobile-nav { display: block; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  .header-inner { height: 66px; padding-top: 6px; }
  .brand { font-size: 18px; }
  .header-actions .pill { display: none; }
}

/* ---------------------------------------------------------------------------
   Pills (buttons)
   --------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 24px;
  border-radius: 23px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-2px); text-decoration: none; }
.pill:active { transform: translateY(0) scale(0.98); }
.pill-ink { background: var(--ink); color: var(--on-ink); }
.pill-ink:hover { box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.6); }
.pill-outline { border-color: var(--line); color: var(--text); }
.pill-outline:hover { border-color: var(--text); }
.pill-sm { min-height: 38px; padding: 7px 18px; font-size: 14px; border-radius: 19px; }
.pill svg { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; }

/* Tags and chips */
.stack-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--card);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.tag.ink { background: var(--ink); color: var(--on-ink); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  background: transparent;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Cards that lift (ScrapNote's "little things" cards) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lift {
  background: var(--card);
  border: 1.2px solid transparent;
  border-radius: 16px;
  padding: 22px;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.lift:hover { transform: translateY(-6px); border-color: var(--text); box-shadow: var(--lift-shadow); }
.lift-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s, color 0.25s;
}
.lift:hover .lift-icon { background: var(--ink); color: var(--on-ink); }
.lift-icon svg { width: 20px; height: 20px; fill: currentColor; }
.lift h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; margin: 16px 0 2px; }
.lift .meta { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.lift p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.lift .stack-line { margin: 0; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* Ticks list */
.ticks { list-style: none; padding: 0; margin: 16px 0 22px; }
.ticks li { color: var(--text-2); padding: 4px 0 4px 28px; position: relative; font-size: 14.5px; }
.ticks li strong { color: var(--text); }
.ticks li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 12px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(-45deg);
}

/* Dotted block behind showcase pieces */
.dots {
  background-color: var(--card);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px);
  background-size: 14px 14px;
}

/* ---------------------------------------------------------------------------
   Hero: text + a deck of cards you can drag around
   --------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 40px;
}
.hero-text .hi { font-size: 17px; font-weight: 700; color: var(--text-2); margin: 0 0 10px; display: flex; align-items: center; gap: 12px; }
.hi-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
/* Sizes follow scrapnote.web.app's landing page */
.hero-text h1 {
  font-size: clamp(26px, 3.3vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 14px;
}
.hero-role { font-size: 15px; font-weight: 700; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.hero-role .sep { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.hero-sub { color: var(--text-2); font-size: 16.5px; line-height: 1.65; max-width: 470px; margin: 0 0 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.deck { position: relative; height: 540px; touch-action: pan-y; }
.deck .block { position: absolute; left: 50%; top: 46%; width: 400px; height: 400px; margin: -200px 0 0 -200px; border-radius: 50%; }
.dcard {
  --x: 0px;
  --y: 0px;
  --r: 0deg;
  --s: 1;
  position: absolute;
  left: 50%;
  top: 46%;
  width: 232px;
  margin: -170px 0 0 -116px;
  padding: 10px 10px 6px;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 20px;
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.45), 0 10px 20px -16px rgba(0, 0, 0, 0.3);
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s));
  transition: transform 0.7s var(--ease), box-shadow 0.3s;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.dcard:hover { --s: 1.02; }
.dcard.dragging { transition: box-shadow 0.3s; cursor: grabbing; --s: 1.05; box-shadow: 0 50px 80px -30px rgba(0, 0, 0, 0.55); }
.dcard .pic { aspect-ratio: 4 / 5; border-radius: 13px; overflow: hidden; background: var(--card); position: relative; }
.dcard .pic img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dcard .cap { display: flex; align-items: center; gap: 10px; padding: 9px 2px 3px; }
.dcard .cap .ic { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
.dcard .cap b { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; letter-spacing: -0.2px; }
.dcard .cap small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.3; }
.dcard .go {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.dcard .go:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.dcard .go svg { width: 16px; height: 16px; fill: currentColor; }
/* Project cards: the logo centered on black, like ScrapNote's own art */
.dcard .pic.brand-pic { background: #000000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; text-align: center; }
.dcard .pic.brand-pic img { width: auto; height: auto; object-fit: contain; }
.dcard .pic.brand-pic img.icon { width: 92px; height: 92px; border-radius: 22px; }
.dcard .pic.brand-pic img.round { width: 96px; height: 96px; border-radius: 50%; }
.dcard .pic.brand-pic img.word { width: 130px; }
.dcard .pic.brand-pic img.wide { width: 160px; }
.dcard .pic.brand-pic b { color: #FFFFFF; font-size: 19px; font-weight: 900; letter-spacing: -0.5px; line-height: 1; }
.dcard .pic.brand-pic span { font-size: 12.5px; font-weight: 700; line-height: 1.35; max-width: 170px; }
.deck-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 12px; z-index: 40; }
.deck-hint { font-size: 12.5px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.deck-hint svg { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 1080px) { .dcard { width: 210px; margin: -155px 0 0 -105px; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 24px; gap: 8px; }
  .hero-text .hi, .hero-cta, .hero-role { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .deck { margin-top: 12px; }
}
@media (max-width: 560px) {
  .deck { height: 470px; }
  .deck .block { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .dcard { width: 176px; margin: -130px 0 0 -88px; padding: 8px 8px 4px; border-radius: 16px; }
  .dcard .pic { border-radius: 10px; }
  .dcard .cap .ic { width: 24px; height: 24px; }
  .dcard .cap b { font-size: 12.5px; }
  .dcard .cap small { font-size: 10.5px; }
  .dcard .go { width: 26px; height: 26px; }
  .dcard .pic.brand-pic { gap: 10px; padding: 12px; }
  .dcard .pic.brand-pic img.icon { width: 64px; height: 64px; border-radius: 16px; }
  .dcard .pic.brand-pic img.round { width: 68px; height: 68px; }
  .dcard .pic.brand-pic img.word { width: 100px; }
  .dcard .pic.brand-pic img.wide { width: 128px; }
  .dcard .pic.brand-pic b { font-size: 15px; }
  .dcard .pic.brand-pic span { font-size: 10.5px; max-width: 140px; }
}

/* ---------------------------------------------------------------------------
   Phone mockup (ScrapNote only). The screen is drawn at 360 x 776 and scaled.
   --------------------------------------------------------------------------- */
.device {
  --s: 0.6611;
  position: relative;
  width: 256px;
  height: 530px;
  padding: 9px;
  border-radius: 41px;
  background: var(--frame);
  box-shadow: var(--phone-shadow), inset 0 0 0 1.5px var(--frame-edge);
  flex-shrink: 0;
}
.device::before, .device::after {
  content: '';
  position: absolute;
  right: -3px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--frame-edge);
}
.device::before { top: 106px; height: 62px; }
.device::after { top: 185px; height: 40px; }
.screen { width: 238px; height: 512px; border-radius: 33px; overflow: hidden; position: relative; background: var(--bg); }
.device.small { --s: 0.5889; width: 228px; height: 472px; padding: 8px; border-radius: 37px; }
.device.small::before { top: 94px; height: 54px; }
.device.small::after { top: 165px; height: 34px; }
.device.small .screen { width: 212px; height: 456px; border-radius: 30px; }
@media (max-width: 560px) {
  .device, .device.small { --s: 0.6222; width: 240px; height: 497px; padding: 8px; border-radius: 38px; }
  .device::before, .device.small::before { top: 100px; height: 58px; }
  .device::after, .device.small::after { top: 175px; height: 36px; }
  .screen, .device.small .screen { width: 224px; height: 481px; border-radius: 31px; }
}

/* ScrapNote's own colors (AppColors), light and dark */
.sn-app {
  --sn-yellow: #FFE788;
  --sn-accent: #B08600;
  --sn-green: #A8E6A3;
  --sn-red: #D93636;
  --bg: #FFFFFF;
  --card: #F1F1F3;
  --divider: #DEDEE2;
  --line: #C9C9CF;
  --text: #111111;
  --text-2: #5E5E63;
  --muted: #8E8E93;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sn-app { --sn-accent: #FFE788; --sn-red: #FF6B6B; --bg: #000000; --card: #272727; --divider: #383838; --line: #454545; --text: #FFFFFF; --text-2: #B0B0B0; --muted: #707070; }
}
:root[data-theme="dark"] .sn-app { --sn-accent: #FFE788; --sn-red: #FF6B6B; --bg: #000000; --card: #272727; --divider: #383838; --line: #454545; --text: #FFFFFF; --text-2: #B0B0B0; --muted: #707070; }

.ui {
  width: 360px;
  height: 776px;
  transform: scale(var(--s));
  transform-origin: 0 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
}
.ui svg { fill: currentColor; flex-shrink: 0; }
:where(.ui) button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.ui-status { height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 4px 26px 0; font-size: 13.5px; font-weight: 700; }
.ui-status .icons { display: flex; gap: 5px; align-items: center; }
.ui-status .icons svg { width: 15px; height: 15px; }
.ui-cam { position: absolute; top: 12px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #000000; box-shadow: 0 0 0 2px #1E1E1E; z-index: 5; }
.ui-appbar { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 4px 0 16px; flex-shrink: 0; }
.ui-appbar .logo { width: 26px; height: 26px; margin-right: 4px; }
.ui-appbar .title { font-size: 22px; font-weight: 900; letter-spacing: -0.6px; }
.ui-appbar .acts { margin-left: auto; display: flex; }
.ui-appbar .acts svg { width: 22px; height: 22px; margin: 0 12px; }
.ui-wsbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px 12px; }
.ui-ws { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; background: var(--card); border: 1px solid var(--divider); border-radius: 20px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ui-ws .badge { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.ui-ws .badge svg { width: 13px; height: 13px; }
.ui-count { color: var(--text-2); font-size: 12px; font-weight: 600; }
.ui-today { font-size: 18px; font-weight: 700; padding: 6px 16px 4px; }
.ui-list { flex: 1; overflow: hidden; position: relative; }
.app-card { display: block; width: calc(100% - 32px); background: var(--card); border-radius: 14px; padding: 14px 16px; margin: 6px 16px; position: relative; color: var(--text); }
.app-card .top { display: flex; align-items: flex-start; gap: 10px; }
.app-card .t { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.app-card .d { color: var(--text-2); font-size: 12.5px; font-weight: 300; line-height: 1.4; margin-top: 6px; }
.app-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; min-height: 22px; }
.app-card .when { color: var(--text-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: auto; }
.app-card .when.due { color: var(--sn-red); }
.mini-pill { font-size: 11.5px; font-weight: 600; padding: 4px 14px; border-radius: 20px; white-space: nowrap; color: #000000; transition: transform 0.15s; }
.mini-pill.done { background: var(--sn-green); }
.mini-pill.snooze { background: var(--sn-yellow); }
.mini-pill.outline { background: transparent; color: var(--sn-accent); border: 1px solid var(--sn-accent); padding: 3px 14px; }
button.mini-pill:hover { transform: scale(1.06); }
.pills { display: flex; gap: 8px; flex-shrink: 0; }

.ui-nav { margin-top: auto; height: 81px; flex-shrink: 0; background: var(--card); border-radius: 20px 20px 0 0; display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr; align-items: start; padding: 12px 8px 0; position: relative; z-index: 3; }
.ui-nav .item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.ui-nav .item.on { color: var(--text); font-weight: 600; }
.ui-nav .item svg { width: 24px; height: 24px; }
.ui-nav .fab { position: absolute; left: 50%; top: -16px; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%; background: var(--sn-yellow); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.ui-nav .fab svg { width: 30px; height: 30px; fill: #000000; }

/* Done: the card folds away; the snackbar offers Undo with a draining yellow bar */
.sn-card { transition: opacity 0.26s, transform 0.26s var(--ease), max-height 0.3s 0.1s, margin 0.3s 0.1s, padding 0.3s 0.1s; max-height: 140px; overflow: hidden; }
.sn-card.folding { opacity: 0; transform: translateX(40px); max-height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
.sn-empty { display: none; text-align: center; padding: 70px 30px 0; color: var(--text-2); }
.sn-empty img { width: 54px; height: 54px; margin: 0 auto 10px; opacity: 0.35; filter: grayscale(1); }
.sn-empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.sn-empty .mini-pill { display: inline-block; margin-top: 16px; }
.ui-list.is-empty .sn-empty { display: block; }
.ui-snack {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 96px;
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 14px 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  z-index: 4;
}
.ui-snack.show { transform: none; opacity: 1; pointer-events: auto; }
.ui-snack button { color: var(--sn-accent); font-weight: 700; }
.ui-snack::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--sn-yellow); }
.ui-snack.show::after { animation: drain 5s linear forwards; }
@keyframes drain { from { width: 100%; } to { width: 0%; } }

/* Quick Add screen */
.qa { color: var(--sn-accent); }
.qa-form { padding: 8px 20px 0; flex: 1; display: flex; flex-direction: column; }
.qa-kind { display: flex; gap: 8px; margin: 4px 0 6px; }
.qa-kind span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border-radius: 18px; font-size: 12.5px; font-weight: 500; color: var(--text-2); border: 1px solid var(--line); }
.qa-kind span.on { color: var(--sn-accent); border-color: var(--sn-accent); font-weight: 700; }
.qa-kind svg { width: 15px; height: 15px; }
.qa-title { font-size: 16.5px; font-weight: 600; padding: 12px 0 8px; border-bottom: 1.5px solid var(--sn-accent); min-height: 50px; word-break: break-word; }
.qa-title .caret { display: inline-block; width: 2px; height: 19px; background: var(--sn-accent); vertical-align: -4px; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.qa-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--sn-accent); color: var(--sn-accent); font-size: 12.5px; font-weight: 600; }
.qa-chip[hidden] { display: none; }
.qa-desc { margin-top: 12px; height: 120px; color: var(--muted); font-size: 13px; font-weight: 300; }
.qa-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-size: 13.5px; font-weight: 600; border-top: 1px solid var(--divider); }
.qa-row svg { width: 17px; height: 17px; }
.qa-row span { margin-left: auto; font-size: 12px; color: var(--sn-accent); }
.qa-save { margin: auto 0 18px; height: 44px; border-radius: 22px; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13.5px; }
.qa-field input { width: 100%; margin: 8px 0 12px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; font-weight: 600; transition: border-color 0.15s; }
.qa-field input:focus { outline: none; border-color: var(--text); }
.qa-examples .chip { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.qa-examples .chip:hover { border-color: var(--text); background: var(--card); }

/* Tilt + float: the phone leans and drifts; pointing at it straightens it */
.tilt { transform: perspective(1600px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) rotate(var(--r, 0deg)); transition: transform 0.6s var(--ease); }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (hover: hover) { .phone-stage:hover .tilt { transform: perspective(1600px) rotateY(0deg) rotateX(0deg) rotate(0deg) scale(1.03); } }

/* Stages: something to look at, over a dotted block */
.phone-stage { position: relative; display: flex; justify-content: center; padding: 30px 0; }
.phone-stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 330px;
  margin: -165px 0 0 -150px;
  border-radius: 36px;
  background-color: var(--card);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px);
  background-size: 14px 14px;
  transform: rotate(var(--bg-r, 6deg));
}
.phone-stage .tilt { --r: -5deg; --ry: 10deg; }
.flip .phone-stage { --bg-r: -6deg; }
.flip .phone-stage .tilt { --r: 5deg; --ry: -10deg; }
.window-stage { position: relative; padding: 30px 0; display: flex; justify-content: center; }
.window-stage::before {
  content: '';
  position: absolute;
  inset: 0 6%;
  border-radius: 36px;
  background-color: var(--card);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px);
  background-size: 14px 14px;
  transform: rotate(var(--bg-r, -3deg));
}
.flip .window-stage { --bg-r: 3deg; }
.try-hint { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.try-hint svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.lean { transform: perspective(1600px) rotateY(var(--ly, -8deg)) rotate(var(--lr, 1.5deg)); transition: transform 0.6s var(--ease); }
.flip .lean { --ly: 8deg; --lr: -1.5deg; }
@media (hover: hover) { .window-stage:hover .lean { transform: none; } }
@media (max-width: 560px) {
  .phone-stage::before { width: 270px; height: 320px; margin: -160px 0 0 -135px; border-radius: 32px; }
  .lean { --ly: 0deg; --lr: 0deg; }
}

/* ---------------------------------------------------------------------------
   Selected work rows (text one side, a working demo the other, alternating)
   --------------------------------------------------------------------------- */
.work-intro { padding-top: 72px; text-align: center; }
.work-intro .lead { margin-left: auto; margin-right: auto; }
/* Text and demo sit as one centered pair, so neither side is left with empty space */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 500px) auto;
  justify-content: center;
  align-items: center;
  column-gap: clamp(40px, 7vw, 110px);
  row-gap: 24px;
  padding-top: 48px;
  padding-bottom: 48px;
}
.feature-row.flip { grid-template-columns: auto minmax(0, 500px); }
.feature-row.flip .feature-text { order: 2; }
.feature-row .phone-stage { width: 360px; }
.feature-row .window-stage { width: min(500px, 42vw); }
.proj-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.proj-logo { width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0; object-fit: cover; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.4); }
.proj-logo.round { border-radius: 50%; }
.proj-head .h2 { margin: 0; }
.proj-head .num { display: block; font-size: 12.5px; font-weight: 800; color: var(--muted); letter-spacing: 1px; }
.feature-text .kind { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.feature-text p { color: var(--text-2); font-size: 15px; margin: 0 0 12px; }
.feature-text .role { font-size: 13.5px; color: var(--text); font-weight: 700; margin: 0 0 10px; }
.feature-text .role b { color: var(--muted); font-weight: 600; }
.row-links { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) {
  .feature-row, .feature-row.flip { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 40px; }
  .feature-row.flip .feature-text { order: 0; }
  .feature-row .phone-stage, .feature-row .window-stage { width: 100%; }
}

/* ---- Hoshii: a Discord window with a real wish (compact so x 100 still fits) ---- */
.dc-window {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #313338;
  color: #DBDEE1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--phone-shadow), inset 0 0 0 1px #1E1F22;
  font-size: 13px;
  line-height: 1.375;
  text-align: left;
}
.dc-bar { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-bottom: 1px solid #26272B; font-weight: 700; color: #F2F3F5; font-size: 14px; }
.dc-bar .hash { color: #80848E; font-size: 20px; font-weight: 400; }
.dc-bar .srv { margin-left: auto; color: #949BA4; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dc-bar .srv img { width: 16px; height: 16px; border-radius: 50%; }
.dc-feed { padding: 12px 14px 14px; }
.dc-reply { display: flex; align-items: center; gap: 5px; margin: 0 0 3px 48px; font-size: 12px; color: #B5BAC1; position: relative; white-space: nowrap; overflow: hidden; }
.dc-reply::before { content: ''; position: absolute; left: -30px; top: 8px; width: 26px; height: 9px; border-left: 2px solid #4E5058; border-top: 2px solid #4E5058; border-top-left-radius: 6px; }
.dc-reply img { width: 15px; height: 15px; border-radius: 50%; }
.dc-reply b { color: #DBDEE1; font-weight: 600; }
.dc-reply i { color: #B5BAC1; }
.dc-reply svg { width: 14px; height: 14px; fill: #B5BAC1; }
.dc-msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.dc-av { width: 36px; height: 36px; border-radius: 50%; }
.dc-name { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-weight: 600; color: #F2F3F5; font-size: 14px; }
.dc-app { background: #5865F2; color: #FFFFFF; font-size: 9.5px; font-weight: 700; padding: 1px 4px; border-radius: 4px; display: inline-flex; align-items: center; gap: 2px; letter-spacing: 0.2px; line-height: 1.4; }
.dc-app svg { width: 9px; height: 9px; fill: currentColor; }
.dc-name time { color: #949BA4; font-size: 11px; font-weight: 500; }
.dc-embed {
  --c: #FFFFFF;
  margin-top: 4px;
  background: #2B2D31;
  border-left: 4px solid var(--c);
  border-radius: 4px;
  padding: 9px 12px 10px 10px;
  max-width: 290px;
  transition: border-color 0.3s;
}
.dc-author { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #F2F3F5; }
.dc-author img { width: 20px; height: 20px; border-radius: 50%; }
.dc-title { font-weight: 700; color: #F2F3F5; font-size: 14px; margin-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.dc-title code, .dc-list code { background: #1E1F22; border-radius: 4px; padding: 0 4px; font-size: 11.5px; font-family: Consolas, 'Courier New', monospace; font-weight: 600; }
.dc-emo { width: 18px; height: 18px; vertical-align: -4px; display: inline-block; }
.dc-stars { display: flex; gap: 2px; margin-top: 5px; min-height: 20px; }
.dc-stars img { width: 20px; height: 20px; }
.dc-fields { font-size: 12.5px; margin-top: 2px; }
.dc-fields b { color: #F2F3F5; }
.dc-fields i { color: #B5BAC1; }
.dc-card { margin-top: 8px; width: 100%; max-width: 168px; aspect-ratio: 268 / 374; border-radius: 6px; overflow: hidden; background: #1E1F22; }
.dc-card img { width: 100%; height: 100%; object-fit: cover; }
.dc-embed.multi .dc-card { max-width: 110px; }
.dc-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: #DBDEE1; }
.dc-foot img { width: 18px; height: 18px; border-radius: 50%; }
.dc-list { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; max-height: 172px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #1A1B1E transparent; }
.dc-list li { display: flex; align-items: center; gap: 4px; padding: 1px 0; white-space: nowrap; }
.dc-list li img { width: 16px; height: 16px; flex-shrink: 0; }
.dc-list li b { color: #F2F3F5; overflow: hidden; text-overflow: ellipsis; }
.dc-list li i { color: #B5BAC1; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dc-list li .tail { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; }
.dc-more { font-size: 11.5px; font-style: italic; color: #B5BAC1; margin-top: 4px; }
/* "is wishing..." while the reveal plays */
.dc-wishing { margin-top: 8px; height: 120px; border-radius: 6px; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--c) 55%, transparent) 0%, color-mix(in srgb, var(--c) 15%, transparent) 30%, #0B0C0E 70%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dc-wishing img { width: 64px; height: 64px; filter: drop-shadow(0 0 16px var(--c)); animation: burst 1.5s var(--ease) both; }
@keyframes burst { 0% { transform: scale(0.2) rotate(-90deg); opacity: 0; } 45% { transform: scale(1.2) rotate(0deg); opacity: 1; } 100% { transform: scale(2.2) rotate(45deg); opacity: 0.1; } }
.dc-pulls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dc-pull { display: inline-flex; align-items: center; gap: 5px; background: #5865F2; color: #FFFFFF; border: 0; border-radius: 6px; padding: 5px 13px; font-weight: 600; font-size: 13px; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.dc-pull img { width: 18px; height: 18px; }
.dc-pull:hover { background: #4752C4; }
.dc-pull:active { transform: scale(0.97); }
.dc-pull:disabled { opacity: 0.55; cursor: default; }
.dc-edited { color: #949BA4; font-size: 10.5px; margin-top: 3px; }
@media (max-width: 560px) {
  .dc-feed { padding: 10px 10px 12px; }
  .dc-msg { grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
  .dc-av { width: 32px; height: 32px; }
  .dc-reply { margin-left: 41px; }
  .dc-pull { padding: 5px 11px; font-size: 12.5px; }
  .dc-card { max-width: 150px; }
}

/* ---- RevAItalize: a session in a browser window ---- */
.browser {
  position: relative;
  width: 100%;
  max-width: 540px;
  container-type: inline-size;
  background: var(--frame);
  border-radius: 14px;
  padding: 0 6px 6px;
  box-shadow: var(--phone-shadow), inset 0 0 0 1.5px var(--frame-edge);
}
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #5A5A5A; }
.browser-bar .url { flex: 1; margin-left: 10px; height: 18px; border-radius: 9px; background: #2A2A2A; color: #A0A0A0; font-size: 10.5px; display: flex; align-items: center; padding: 0 10px; font-style: normal; overflow: hidden; white-space: nowrap; }
.browser > img { border-radius: 9px; width: 100%; }
.rv { background: #FFFFFF; color: #0A0A0A; border-radius: 9px; overflow: hidden; display: grid; grid-template-columns: 22% 1fr; aspect-ratio: 16 / 10.4; font-size: 2.1cqw; line-height: 1.3; }
.rv-side { background: linear-gradient(180deg, #082B57, #0B4A93); color: #FFFFFF; padding: 5cqw 2.6cqw; display: flex; flex-direction: column; gap: 1.6cqw; }
.rv-side .lg { width: 100%; height: auto; margin-bottom: 2cqw; }
.rv-side .it { opacity: 0.65; font-weight: 600; padding: 1cqw 1.4cqw; border-radius: 1.2cqw; }
.rv-side .it.on { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.rv-main { display: flex; flex-direction: column; padding: 2.4cqw; gap: 2cqw; min-width: 0; }
.rv-title { font-weight: 800; font-size: 2.7cqw; }
.rv-panels { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; min-height: 0; }
.rv-cam { background: #DDEBF7; border-radius: 1.6cqw; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.rv-cam .tg { position: absolute; left: 1.4cqw; top: 1.4cqw; background: rgba(0, 0, 0, 0.7); color: #FFFFFF; font-weight: 700; font-size: 1.7cqw; padding: 0.4cqw 1.2cqw; border-radius: 1cqw; }
.rv-cam svg { width: 70%; height: auto; overflow: visible; }
.rv-cam .guide { opacity: 0.45; }
.rv-bottom { display: flex; align-items: center; gap: 2.6cqw; }
.rv-ring { width: 7.4cqw; height: 7.4cqw; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 3cqw; background: conic-gradient(#1677E5 calc(var(--p, 0) * 1%), #E3E3E3 0); position: relative; flex-shrink: 0; }
.rv-ring::before { content: ''; position: absolute; inset: 0.8cqw; border-radius: 50%; background: #FFFFFF; }
.rv-ring span { position: relative; }
.rv-set { font-weight: 800; font-size: 2.3cqw; }
.rv-set small { display: block; font-weight: 600; color: #777777; font-size: 1.6cqw; }
.rv-fb { flex: 1; min-width: 0; text-align: center; }
.rv-fb b { display: block; font-size: 2.2cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv.warn .rv-fb b { color: #C98A00; }
.rv-acc { height: 0.9cqw; border-radius: 1cqw; background: #E3E3E3; overflow: hidden; margin: 0.8cqw auto 0.4cqw; max-width: 80%; }
.rv-acc i { display: block; height: 100%; width: var(--acc, 0%); background: #0A0A0A; transition: width 0.6s var(--ease); }
.rv-fb small { color: #777777; font-size: 1.5cqw; }
.rv-go { background: #0A0A0A; color: #FFFFFF; border: 0; border-radius: 3cqw; padding: 1.4cqw 2.6cqw; font-weight: 800; font-size: 1.9cqw; cursor: pointer; white-space: nowrap; transition: transform 0.15s; }
.rv-go:hover { transform: scale(1.04); }
.fig .arms { transform-origin: 100px 62px; transform-box: view-box; }
.rv.running .fig .arms { animation: rotate-torso 2.4s ease-in-out infinite; }
.rv.running .guide .arms { animation-delay: -0.2s; }
@keyframes rotate-torso {
  0%, 100% { transform: scaleX(1); }
  25% { transform: scaleX(0.35) skewY(-6deg); }
  50% { transform: scaleX(1); }
  75% { transform: scaleX(0.35) skewY(6deg); }
}
.fig .joint { fill: #E5254B; transition: fill 0.3s; }
.fig .joint.hip { fill: #FFFFFF; stroke: #0A0A0A; stroke-width: 2; }
.rv.warn .fig .joint.up { fill: #FFB020; }

/* ---------------------------------------------------------------------------
   More work
   --------------------------------------------------------------------------- */
.more { padding-top: 56px; padding-bottom: 24px; }

/* ---------------------------------------------------------------------------
   Experience: one line per role
   --------------------------------------------------------------------------- */
.exp { padding-top: 72px; padding-bottom: 24px; }
.roles { display: grid; gap: 10px; margin-top: 24px; }
.job { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 16px; padding: 16px 20px; }
.job .logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.job .logo.round { border-radius: 50%; }
.job .logo.ini { background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; }
.job h3 { margin: 0; font-size: 16px; }
.job .co { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.job .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.job .when { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.job .stack-line { margin: 0; justify-content: flex-end; }
.exp-foot { margin-top: 18px; }
@media (max-width: 700px) {
  .job { grid-template-columns: 40px 1fr; }
  .job .logo { width: 40px; height: 40px; }
  .job .right { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .job .stack-line { justify-content: flex-start; }
}

/* ---------------------------------------------------------------------------
   Stack
   --------------------------------------------------------------------------- */
.tools { padding-top: 72px; padding-bottom: 24px; text-align: center; }
.tools .lead { margin-left: auto; margin-right: auto; }
.tools .card-grid { text-align: left; }
.tools .lift .stack-line { margin-top: 12px; }
.marquee { overflow: hidden; margin: 0 0 32px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: slide 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .chip { font-size: 14px; padding: 7px 16px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------------------
   About
   --------------------------------------------------------------------------- */
.about { padding-top: 72px; padding-bottom: 72px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.photo-stage { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.photo-stage .bg { position: absolute; inset: 6% 8%; border-radius: 36px; transform: rotate(-5deg); }
.photo {
  position: relative;
  width: min(320px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  transform: rotate(3deg);
  transition: transform 0.5s var(--ease);
  box-shadow: var(--lift-shadow);
  background: var(--card-2);
}
.photo:hover { transform: rotate(0deg) scale(1.02); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { color: var(--text-2); margin: 0 0 14px; font-size: 15.5px; }
.about-text p strong { color: var(--text); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 24px; } }

/* ---------------------------------------------------------------------------
   Contact band
   --------------------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--on-ink); padding: 80px 0 88px; }
.contact .h2 { margin: 0; font-size: clamp(26px, 3.6vw, 40px); }
.contact-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.contact-head p { margin: 10px 0 0; opacity: 0.7; font-weight: 600; max-width: 520px; }
.contact .pill-ink { background: var(--on-ink); color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 760px; }
.c-card {
  background: var(--bg);
  color: var(--text);
  border-radius: 20px;
  padding: 22px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.35);
  min-width: 0;
}
.c-card:hover { transform: translateY(-8px); box-shadow: 0 26px 50px -24px rgba(0, 0, 0, 0.5); text-decoration: none; }
.c-card .lift-icon { margin-bottom: 12px; }
.c-card:hover .lift-icon { background: var(--ink); color: var(--on-ink); }
.c-card b { font-size: 16px; font-weight: 800; }
.c-card span { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; max-width: 460px; } }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-footer { background: var(--footer); }
.footer-inner { width: calc(100% - 2 * var(--gutter)); max-width: 1180px; margin: 0 auto; padding: 48px 0 24px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 12px 0 0; max-width: 320px; line-height: 1.6; }
.footer-col h3 { font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.footer-col a { display: block; color: var(--text-2); text-decoration: none; font-size: 14px; padding: 3px 0; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { width: calc(100% - 2 * var(--gutter)); max-width: 1180px; margin: 0 auto; padding: 20px 0 32px; border-top: 1px solid var(--divider); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------------
   Case study pages
   --------------------------------------------------------------------------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--text-2); margin-bottom: 20px; }
.back:hover { color: var(--text); }
.back svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.2s; }
.back:hover svg { transform: translateX(-3px); }
.cs-hero {
  display: grid;
  grid-template-columns: minmax(0, 500px) auto;
  justify-content: center;
  align-items: center;
  column-gap: clamp(40px, 7vw, 110px);
  row-gap: 24px;
  padding-top: 8px;
  padding-bottom: 32px;
  min-height: min(calc(100svh - 76px), 680px);
}
.cs-hero .phone-stage { width: 340px; }
.cs-hero .window-stage, .cs-hero .art-stage { width: min(520px, 44vw); }
.cs-hero h1 { font-size: clamp(26px, 3.3vw, 44px); line-height: 1.15; font-weight: 800; letter-spacing: -1px; margin: 0 0 14px; }
.cs-hero .lead { margin-bottom: 22px; font-size: 16.5px; }
.cs-logo { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 16px; object-fit: cover; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5); }
.cs-logo.round { border-radius: 50%; }
@media (max-width: 900px) {
  .cs-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cs-hero .phone-stage, .cs-hero .window-stage, .cs-hero .art-stage { width: 100%; }
}

/* Quick facts: just text, two columns (role, timeline, ...) */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; margin: 4px 0 28px; max-width: 520px; }
.facts dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; line-height: 1.4; }
@media (max-width: 380px) { .facts { grid-template-columns: 1fr; } }

/* Art in a leaning frame over a dotted block */
.art-stage { position: relative; padding: 28px 0; }
.art-stage::before { content: ''; position: absolute; inset: 0 6%; border-radius: 36px; background-color: var(--card); background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px); background-size: 14px 14px; transform: rotate(4deg); }
.art-frame { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--phone-shadow); transform: perspective(1600px) rotateY(-8deg) rotate(-2deg); transition: transform 0.6s var(--ease); }
.art-stage:hover .art-frame { transform: none; }
.art-frame img { width: 100%; }
@media (max-width: 560px) { .art-frame { transform: rotate(-1.5deg); } }

.cs-body { padding-top: 24px; padding-bottom: 40px; }
.cs-sec { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 44px 0; border-top: 1px solid var(--divider); }
.cs-sec > h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-2); margin: 6px 0 0; position: sticky; top: 96px; align-self: start; }
.cs-sec .content { min-width: 0; }
.cs-sec .content > p { color: var(--text-2); font-size: 16px; margin: 0 0 14px; max-width: 720px; }
.cs-sec .content > p strong { color: var(--text); }
.cs-sec h3 { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; margin: 0 0 10px; }
.cs-sec .card-grid { grid-template-columns: repeat(2, 1fr); margin-top: 8px; }
.cs-sec .lift h3 { font-size: 16px; }
@media (max-width: 900px) {
  .cs-sec { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
  .cs-sec > h2 { position: static; }
}
@media (max-width: 600px) { .cs-sec .card-grid { grid-template-columns: 1fr; } }

.try-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.try-row .feature-text p { font-size: 15px; }
.try-row code { background: var(--card); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
@media (max-width: 1100px) { .try-row { grid-template-columns: 1fr; } }

/* Numbers (Hoshii) as lifting cards */
.num-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.num-cards .lift b { display: block; margin-top: 16px; font-size: clamp(30px, 3.6vw, 42px); font-weight: 900; letter-spacing: -1.4px; line-height: 1; }
.num-cards .lift p { margin: 8px 0 0; }
@media (max-width: 700px) {
  .num-cards { gap: 8px; }
  .num-cards .lift { padding: 14px 12px; }
  .num-cards .lift-icon { display: none; }
  .num-cards .lift b { margin-top: 0; font-size: 24px; letter-spacing: -0.8px; }
  .num-cards .lift p { font-size: 12px; margin-top: 6px; }
}

/* Stats (placeholders, exercises) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 16px; }
.stat { background: var(--card); border-radius: 16px; padding: 18px 18px 16px; }
.stat b { display: block; font-size: clamp(24px, 3vw, 32px); font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
.stat span { font-size: 13px; font-weight: 700; color: var(--text-2); }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }

/* Steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 16px 18px 16px 62px; background: var(--card); border-radius: 16px; color: var(--text-2); font-size: 14.5px; }
.steps li b { display: block; color: var(--text); font-size: 15.5px; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* Screenshots */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.shot { border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--divider); }
.shot img { width: 100%; height: auto; transition: transform 0.6s var(--ease); }
.gallery figure:hover .shot img { transform: scale(1.015); }
.gallery figcaption, .art figcaption { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 8px; }
.ph {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  border: 1.5px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  background-color: var(--card);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 14px 14px;
}
.ph.tall { aspect-ratio: 9 / 16; max-height: 440px; }
.ph svg { width: 28px; height: 28px; fill: currentColor; }
.ph code { font-size: 11.5px; background: var(--bg); padding: 2px 6px; border-radius: 6px; color: var(--text-2); }
.gallery.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery.three { grid-template-columns: 1fr 1fr; }
}
.art { margin: 0; }
.art img { width: 100%; border-radius: 20px; box-shadow: var(--lift-shadow); }

.next-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--ink); color: var(--on-ink); border-radius: 24px; padding: 32px; text-decoration: none; margin: 24px 0 72px; transition: transform 0.3s var(--ease); }
.next-card:hover { transform: translateY(-6px); text-decoration: none; }
.next-card small { display: block; opacity: 0.6; font-weight: 700; font-size: 12.5px; letter-spacing: 0.8px; text-transform: uppercase; }
.next-card b { font-size: clamp(22px, 3vw, 32px); font-weight: 900; letter-spacing: -0.8px; }
.next-card svg { width: 34px; height: 34px; fill: currentColor; flex-shrink: 0; transition: transform 0.3s var(--ease); }
.next-card:hover svg { transform: translateX(6px); }

/* 404: a lost card floating over the dotted circle */
.nf { min-height: calc(100svh - 76px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px var(--gutter) 72px; }
.nf-stage { position: relative; width: 320px; max-width: 100%; height: 320px; margin-bottom: 12px; }
.nf-stage .block { position: absolute; left: 50%; top: 50%; width: 280px; height: 280px; margin: -140px 0 0 -140px; border-radius: 50%; }
.nf-stage .tilt { position: absolute; left: 50%; top: 50%; margin: -135px 0 0 -95px; --r: -7deg; }
@media (hover: hover) { .nf-stage:hover .tilt { transform: rotate(0deg) scale(1.03); } }
.nf-card { width: 190px; padding: 9px 9px 6px; background: var(--bg); border: 1px solid var(--divider); border-radius: 18px; box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.45), 0 10px 20px -16px rgba(0, 0, 0, 0.3); text-align: left; }
.nf-card .pic { aspect-ratio: 4 / 5; border-radius: 12px; background: #000000; color: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nf-card .pic b { font-size: 64px; font-weight: 900; letter-spacing: -3px; line-height: 1; }
.nf-card .pic span { font-size: 12px; font-weight: 700; color: #9A9A9A; }
.nf-card .cap { display: flex; align-items: center; gap: 8px; padding: 8px 2px 2px; font-size: 13px; font-weight: 800; }
.nf-card .cap small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.nf-card .cap .brand-mark { width: 26px; height: 26px; }
.nf h1 { font-size: clamp(26px, 3.3vw, 44px); line-height: 1.15; font-weight: 800; letter-spacing: -1px; margin: 0 0 10px; }
.nf p { color: var(--text-2); font-size: 16.5px; margin: 0 auto 24px; max-width: 420px; }
.nf .row-links { justify-content: center; }
@media (max-width: 560px) {
  .nf h1 { font-size: 25px; }
  .nf p { font-size: 14.5px; }
  .nf-stage { height: 290px; }
}

/* ---------------------------------------------------------------------------
   Reveal on scroll
   --------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .marquee-track, .rv.running .arms, .dc-wishing img, .qa-title .caret { animation: none !important; }
  .tilt, .dcard, .lean { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------------- */
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .pill { min-height: 40px; padding: 8px 18px; font-size: 14px; }
  .pill-sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
  .label { font-size: 11px; margin-bottom: 6px; }
  .h2 { font-size: 22px; letter-spacing: -0.5px; margin-bottom: 12px; }
  .hero-text h1, .cs-hero h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.2; }
  .hero-sub, .lead, .cs-hero .lead { font-size: 14.5px; line-height: 1.6; }
  .feature-text p, .about-text p, .cs-sec .content > p { font-size: 14.5px; }
  .ticks li { font-size: 14px; padding-left: 26px; }
  .ticks li::before { top: 11px; }
  .lift { padding: 18px; }
  .lift h3 { font-size: 15px; margin-top: 12px; }
  .lift p { font-size: 13.5px; }
  .feature-row { padding-top: 32px; padding-bottom: 32px; }
  .work-intro, .exp, .tools, .about { padding-top: 48px; }
  .contact { padding: 52px 0 60px; }
  .next-card { padding: 24px; }
  .proj-logo { width: 42px; height: 42px; }
}

/* ---------------------------------------------------------------------------
   Black and white until you point at it (or tap it on a phone)
   --------------------------------------------------------------------------- */
.colorize { filter: grayscale(1); transition: filter 0.5s; }
.colorize.on { filter: none; }
@media (hover: hover) { .colorize:hover { filter: none; } }
