/* Bento OS homepage: loads after site.css and reuses its Ember tokens */
.bento-page { padding: 48px 0 140px; }
.bento-page section { padding: 0; margin-bottom: 56px; }
.bento-label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 500 0.74rem var(--mono); color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase;
}
.bento-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bento-label b { color: var(--accent); font-weight: 500; }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(180px, auto); gap: 14px; }
.tile {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 22px; padding: 22px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  display: flex; flex-direction: column; min-width: 0;
  transition: border-color .3s, translate .8s cubic-bezier(.2,.7,.2,1), opacity .8s cubic-bezier(.2,.7,.2,1);
}
a.tile { color: var(--text); }
a.tile:hover { text-decoration: none; }
.tile:hover { border-color: var(--glass-border-hi); }
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.16), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.tile:hover::before { opacity: 1; }
.tile .t-kicker { font: 500 0.7rem var(--mono); color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.tile h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
.tile h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }
.tile .go {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--glass-border-hi); color: var(--text);
  background: rgba(var(--deep-rgb), 0.5); transition: transform .3s, background .3s, color .3s;
}
.tile:hover .go { transform: rotate(-45deg); background: var(--accent); color: var(--accent-ink); }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.row-2 { grid-row: span 2; }

/* Intro tile */
.intro { justify-content: space-between; padding: 30px; }
.intro .who { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.avatar {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font: 700 1.05rem var(--mono); color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.35);
}
.intro .who b { display: block; font-size: 1.05rem; }
.intro .who span { color: var(--muted); font-size: 0.9rem; }
.intro h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin-bottom: 14px; }
.intro .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
kbd {
  font: 500 0.75rem var(--mono); padding: 3px 7px; border-radius: 6px; color: var(--text);
  border: 1px solid var(--glass-border-hi); background: rgba(var(--deep-rgb), 0.6); box-shadow: inset 0 -1px 0 rgba(var(--tint-rgb), 0.15);
}
.k-hint { color: var(--faint); font-size: 0.85rem; display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.k-hint:hover { color: var(--text); }

/* Stat tiles */
.stat-tile { justify-content: flex-end; }
.stat-tile b { font: 650 clamp(2.6rem, 5vw, 3.6rem)/1 var(--sans); letter-spacing: -0.04em; background: linear-gradient(180deg, var(--text), rgba(var(--tint-rgb), 0.55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile span { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.stat-tile .spark { position: absolute; top: 18px; left: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }

/* Now tile */
.now-tile .live { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); margin-bottom: 12px; }
.now-tile .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ping 2.2s infinite; }
.now-tile ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.92rem; color: var(--muted); }
.now-tile li { display: flex; gap: 10px; }
.now-tile li span { font: 500 0.72rem var(--mono); color: var(--faint); min-width: 74px; padding-top: 2px; }

/* Project tiles */
.proj .media {
  margin: -22px -22px 18px; height: 190px; background: rgba(244, 246, 245, 0.95); overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}
.proj .media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.proj .media.contain img { object-fit: contain; padding: 14px; }
.proj:hover .media img { transform: scale(1.05); }
.proj.row-2 .media { height: auto; flex: 1; min-height: 220px; background: rgba(var(--deep-rgb), 0.5); display: grid; place-items: center; padding: 22px; }
.proj .media.video, .proj.row-2 .media.video { padding: 0; background: #0a1014; display: block; position: relative; }
.media.video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; display: block; }
.proj:hover .media.video video { transform: scale(1.03); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; list-style: none; padding-left: 0; }
.chips li { font: 500 0.7rem var(--mono); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--glass-border); color: var(--muted); }
.flagship-badge { display: inline-block; font: 500 0.68rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: rgba(var(--accent-rgb), 0.16); color: var(--accent); margin-right: 6px; }

/* Design tile: two flyers */
.design-tile .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.design-tile .pair button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #f4f1ea; height: 230px; }
.design-tile .pair img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.design-tile .pair button:hover img { transform: scale(1.05); }

/* Skills tile */
.skill-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skill-list li { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(var(--deep-rgb), 0.35); border: 1px solid var(--glass-border); }
.skill-list .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.skill-list .ic svg { width: 18px; height: 18px; }
.skill-list b { display: block; font-size: 0.93rem; }
.skill-list small { color: var(--faint); font-size: 0.8rem; }
.skill-list a { color: var(--muted); }

/* Tools marquee */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); margin: 0 -22px; }
.marquee + .marquee { margin-top: 10px; }
.marquee .track { display: flex; gap: 10px; width: max-content; animation: marquee 32s linear infinite; }
.marquee.rev .track { animation-direction: reverse; animation-duration: 38s; }
.marquee:hover .track { animation-play-state: paused; }
.logo-chip {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 9px 15px 9px 11px; border-radius: 14px;
  font: 500 0.82rem var(--sans); color: var(--muted);
  border: 1px solid var(--glass-border); background: rgba(var(--tint-rgb), 0.05);
  transition: transform .25s, border-color .25s, background .25s, color .25s;
}
.logo-chip svg { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.06)); }
.logo-chip.plain svg { color: var(--accent-2); }
.logo-chip em { font-style: normal; }
.logo-chip:hover { transform: translateY(-2px); color: var(--text); border-color: var(--glass-border-hi); background: rgba(var(--tint-rgb), 0.09); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Experience tile */
.timeline { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 2px; }
.timeline li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.timeline li:first-child { border-top: 0; }
.timeline .when { font: 500 0.74rem var(--mono); color: var(--faint); padding-top: 2px; }
.timeline b { display: block; font-weight: 600; }
.timeline small { color: var(--muted); }

/* Process tile */
.process { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: p; }
.process li { padding: 12px; border-radius: 14px; background: rgba(var(--deep-rgb), 0.35); border: 1px solid var(--glass-border); font-size: 0.85rem; color: var(--muted); }
.process li::before { counter-increment: p; content: "0" counter(p); display: block; font: 600 1.4rem/1 var(--sans); color: transparent; -webkit-text-stroke: 1px rgba(var(--accent-rgb), 0.7); margin-bottom: 8px; }
.process b { display: block; color: var(--text); font-size: 0.92rem; margin-bottom: 2px; }

/* Contact tile */
.contact-tile { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 34px; flex-wrap: wrap; }
.contact-tile::after { content: ""; position: absolute; width: 460px; height: 460px; right: -140px; top: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28), transparent 65%); z-index: -1; }
.contact-tile h2 { margin-bottom: 6px; }
.contact-tile .links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Dock */
.dock {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; height: 64px;
  border-radius: 22px; background: rgba(var(--deep-rgb), 0.55); border: 1px solid var(--glass-border-hi);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
.dock a, .dock button {
  --s: 1; position: relative; width: calc(44px * var(--s)); height: calc(44px * var(--s));
  display: grid; place-items: center; border-radius: 14px; color: var(--text); cursor: pointer; font-family: inherit;
  background: rgba(var(--tint-rgb), 0.06); border: 1px solid var(--glass-border);
  transition: width .15s ease-out, height .15s ease-out, background .2s;
}
.dock a:hover, .dock button:hover { text-decoration: none; background: rgba(var(--accent-rgb), 0.18); }
.dock a.active { background: rgba(var(--accent-rgb), 0.22); border-color: rgba(var(--accent-rgb), 0.5); }
.dock svg { width: 45%; height: 45%; }
.dock .sep { width: 1px; align-self: stretch; margin: 6px 2px; background: var(--glass-border-hi); }
.dock .tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 500 0.72rem var(--mono); padding: 4px 8px; border-radius: 7px; color: var(--text);
  background: rgba(var(--deep-rgb), 0.9); border: 1px solid var(--glass-border); opacity: 0; pointer-events: none; transition: opacity .15s;
}
.dock a:hover .tip, .dock button:hover .tip, .dock a:focus-visible .tip, .dock button:focus-visible .tip { opacity: 1; }

/* Command palette */
.cmdk { position: fixed; inset: 0; z-index: 120; display: none; place-items: start center; padding: 14vh 16px 16px; background: rgba(3, 3, 3, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cmdk.open { display: grid; animation: fade .2s ease; }
.cmdk .box { width: min(560px, 100%); border-radius: 18px; overflow: hidden; background: rgba(var(--deep-rgb), 0.82); border: 1px solid var(--glass-border-hi); box-shadow: 0 30px 80px rgba(0,0,0,.55); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); }
.cmdk input { width: 100%; padding: 18px 20px; font: 500 1rem var(--sans); color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--glass-border); outline: none; }
.cmdk input::placeholder { color: var(--faint); }
.cmdk ul { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.cmdk .grp { font: 500 0.68rem var(--mono); color: var(--faint); letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 12px 4px; }
.cmdk li[role="option"] { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 0.95rem; }
.cmdk li[role="option"] small { font: 500 0.7rem var(--mono); color: var(--faint); }
.cmdk li[aria-selected="true"] { background: rgba(var(--accent-rgb), 0.16); color: var(--text); }
.cmdk .foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--glass-border); font-size: 0.78rem; color: var(--faint); }
.cmdk .empty { padding: 18px 12px; color: var(--faint); font-size: 0.92rem; }

/* Tile reveal */
.tile.reveal { opacity: 0; translate: 0 22px; }
.tile.reveal.in { opacity: 1; translate: 0 0; }

/* Responsive */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-4 { grid-column: span 2; }
  .process { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .span-2, .span-4 { grid-column: span 1; }
  .row-2 { grid-row: span 1; }
  .stat-tile { min-height: 150px; }
  .skill-list { grid-template-columns: 1fr; }
  .design-tile .pair button { height: 200px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .dock { gap: 4px; padding: 7px 8px; height: 58px; bottom: 12px; }
  .dock a, .dock button { width: 40px; height: 40px; }
  .k-hint { display: none; }
  .bento-page { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee .track { animation: none; flex-wrap: wrap; width: auto; }
  .tile.reveal { opacity: 1; translate: none; }
}

/* Audit feature tile */
.audit-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: -4px 0 18px; }
.audit-stats div { padding: 14px 12px; border-radius: 14px; background: rgba(var(--deep-rgb), .5); border: 1px solid var(--glass-border); }
.audit-stats b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.audit-stats span { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
@media (max-width: 640px) { .audit-stats { grid-template-columns: 1fr 1fr; } }
