/* Page-level layout that the design system does not define. Requires tokens.css and components.css. */

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-4); }
.skills ul { margin-bottom: 0; }

.subhead {
  margin: var(--space-4) 0 var(--space-3);
  font: 500 var(--text-xs)/1.3 var(--font-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.subhead:first-child { margin-top: 0; }

/* A role under a company: no top padding, so it reads as part of the company above. */
.row--role { padding-top: var(--space-6); padding-bottom: 0; }
.employer__head + .row--role, .patents + .row--role { padding-top: var(--space-5); }
.row--role .row__label { padding-top: var(--space-1); }
.row__body > p:last-child { margin-bottom: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.gallery .figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; }

.figure img { display: block; width: 100%; height: auto; }
.row__body > .figure, .row__body > .video, .row__body > .gallery { max-width: var(--measure); }

.row__body p + p { margin-top: var(--space-3); }
.row__body > .figure, .row__body > .video, .row__body > .gallery { margin-top: 0; margin-bottom: var(--space-4); }

/* Product photos in a role row: cap the height so the text under the photo stays close. */
.row--role .figure img { width: auto; max-width: 100%; max-height: 400px; }

/* Mari steps: the three cards copy the Hekavor website (hekavor.com/how-it-works). They keep Hekavor's own colors and Inter in both themes. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fonts/inter-var.woff2") format("woff2"); }
.hgrid {
  --hk-purple-700: #511ccd; --hk-purple-600: #6d65f4; --hk-violet-500: #9b30ff; --hk-pink-300: #ff72f5; --hk-teal-400: #1dd5b7;
  --hk-gray-300: #d2d9e7; --hk-gray-200: #e3e7ee; --hk-surface: #f6f7fb; --hk-ink: #2d2564;
  display: grid; grid-template-columns: 1fr 1.04fr; grid-template-rows: auto 1fr; gap: 16px;
  max-width: 560px; margin: 0 0 var(--space-5); font-family: "Inter", ui-sans-serif, system-ui, sans-serif; color: var(--hk-ink);
}
.hcard { background: #fff; border: 1px solid var(--hk-gray-200); border-radius: 16px; box-shadow: 0 2px 6px rgba(15, 23, 54, 0.06); padding: 20px; min-width: 0; }
.hcard--1 { grid-column: 1; grid-row: 1; }
.hcard--2 { grid-column: 1; grid-row: 2; }
.hcard--3 { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; }
.hcard__head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.hbadge { width: 28px; height: 28px; border-radius: 50%; background: var(--hk-purple-700); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.hcard__title { font-size: 15px; font-weight: 500; line-height: 20px; }
.htiles { display: flex; gap: 16px; padding: 2px 0 4px; }
.htile { position: relative; width: 60px; height: 60px; border-radius: 15px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(15, 23, 54, 0.06); }
.htile--mail { background: linear-gradient(150deg, var(--hk-purple-600), var(--hk-purple-700)); }
.htile--chat { background: linear-gradient(150deg, #41e6cb, var(--hk-teal-400)); }
.htile svg { width: 30px; height: 30px; }
.htile__dot { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--hk-pink-300); border: 2.5px solid #fff; }
.mphone { width: 152px; max-width: 100%; margin: 4px auto 0; border: 2px solid var(--hk-purple-700); border-radius: 34px; padding: 20px 14px; background: #fff; }
.mbub { border-radius: 13px; height: 36px; position: relative; }
.mbub::before, .mbub::after { content: ""; position: absolute; left: 12px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.92); }
.mbub--1 { background: var(--hk-purple-600); width: 86%; border-bottom-left-radius: 4px; }
.mbub--1::before { top: 11px; right: 16px; }
.mbub--1::after { top: 21px; right: 34px; }
.mbub--2 { background: color-mix(in oklab, var(--hk-purple-600) 52%, white); width: 66%; margin: 12px 0 0 auto; border-bottom-right-radius: 4px; }
.mbub--2::before { top: 11px; right: 16px; }
.mbub--2::after { top: 21px; right: 28px; }
.clip { position: relative; padding: 8px 20px 2px; margin-top: auto; }
.board { position: relative; background: var(--hk-surface); border-radius: 14px; padding: 26px 16px; }
.board__clip { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); width: 54px; height: 18px; border-radius: 6px; background: var(--hk-gray-300); }
.crows { display: flex; flex-direction: column; gap: 15px; }
.crow { display: flex; align-items: center; gap: 12px; }
.crow--r { justify-content: flex-end; }
.nlines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.crow--r .nlines { align-items: flex-end; }
.nbar { height: 6px; border-radius: 3px; background: var(--hk-gray-300); }
.nbar--full { width: 100%; }
.nbar--short { width: 60%; }
.ctag { flex-shrink: 0; padding: 7px 11px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; box-shadow: 0 5px 12px rgba(45,37,100,.18); white-space: nowrap; }
.ctag--p { background: var(--hk-purple-600); }
.ctag--deep { background: var(--hk-purple-700); }
.ctag--ddx { background: linear-gradient(135deg, var(--hk-violet-500), var(--hk-pink-300)); }
.ctag--ohl { transform: translateX(-13px); }
.ctag--ohr { transform: translateX(13px); }
@media (max-width: 480px) {
  .hgrid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .hcard--1, .hcard--2, .hcard--3 { grid-column: 1; grid-row: auto; }
}

/* Entrance animation: plays once when the cards scroll into view. */
@keyframes hgDot { 0% { opacity: 0; transform: scale(0); } 65% { transform: scale(1.3); } 100% { opacity: 1; transform: scale(1); } }
@keyframes hgUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hgInL { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: translateX(-13px); } }
@keyframes hgInR { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes hgCard { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hgrid:not(.play) .hcard, .hgrid:not(.play) .htile__dot, .hgrid:not(.play) .mbub, .hgrid:not(.play) .crow { opacity: 0; }
.hgrid.play .hcard { animation: hgCard .6s cubic-bezier(.16,1,.3,1) backwards; }
.hgrid.play .hcard--2 { animation-delay: .45s; }
.hgrid.play .hcard--3 { animation-delay: .9s; }
.hgrid.play .htile__dot { animation: hgDot .65s cubic-bezier(.16,1,.3,1) backwards; }
.hgrid.play .htile:nth-child(1) .htile__dot { animation-delay: .5s; }
.hgrid.play .htile:nth-child(2) .htile__dot { animation-delay: .7s; }
.hgrid.play .mbub--1 { animation: hgUp .7s cubic-bezier(.16,1,.3,1) 1s backwards; }
.hgrid.play .mbub--2 { animation: hgUp .7s cubic-bezier(.16,1,.3,1) 1.2s backwards; }
.hgrid.play .crow { animation: hgInL .7s cubic-bezier(.16,1,.3,1) backwards; }
.hgrid.play .crow--r { animation-name: hgInR; }
.hgrid.play .crows .crow:nth-child(1) { animation-delay: 1.4s; }
.hgrid.play .crows .crow:nth-child(2) { animation-delay: 1.55s; }
.hgrid.play .crows .crow:nth-child(3) { animation-delay: 1.7s; }
.hgrid.play .crows .crow:nth-child(4) { animation-delay: 1.85s; }
.hgrid.play .crows .crow:nth-child(5) { animation-delay: 2s; }
@media (prefers-reduced-motion: reduce) {
  .hgrid:not(.play) .hcard, .hgrid:not(.play) .htile__dot, .hgrid:not(.play) .mbub, .hgrid:not(.play) .crow { opacity: 1; }
  .hgrid.play * { animation: none !important; }
}

/* Employer group: a pinned header (logo, place, dates) stays below the navbar while its roles scroll. */
.employer { margin-top: var(--space-8); }
.employer:first-of-type { margin-top: var(--space-5); }
.employer__head {
  position: sticky; top: var(--nav-height); z-index: 5;
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.employer__head .logo { margin: 0; height: 27.5px; }
.employer__head .logo--tall { height: 50px; }
.employer__head .logo--text { font-size: calc(var(--text-lg) * 1.25); }
.employer__meta { color: var(--text-muted); font-size: var(--text-sm); }
.logo--sans { font-family: var(--font-sans); font-weight: 500; letter-spacing: -0.01em; }

/* Images and videos sit centered in the right column. */
.row__body > .figure, .row__body > .video, .row__body > .gallery { margin-left: 0; margin-right: 0; }
.figure img { margin-left: auto; margin-right: auto; }
.figure figcaption { text-align: center; }

/* Patents: a full-width banner under the employer header, in smaller type. */
.patents {
  display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); gap: var(--space-2) var(--space-5);
  margin: var(--space-4) 0 0; padding: var(--space-4);
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--text-sm); line-height: 1.55; color: var(--text-muted);
}
.patents__label { margin: 0; font: 500 var(--text-xs)/1.5 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.patents ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.patents li { margin: 0 0 var(--space-1); }
.patents li:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .patents { grid-template-columns: minmax(0, 1fr); } }

.hero h1 { color: var(--accent); }
.row__body > .video { margin-bottom: var(--space-3); }
