@font-face {
  font-family: "Archivo Expanded";
  src: url("../fonts/archivo-display.woff2?v=1") format("woff2");
  font-weight: 600 900;
  font-stretch: 125%;
  font-display: swap;
}

/* Tiny subsets holding only the greeting glyphs (Noto Sans, 900). */
@font-face {
  font-family: "Hello";
  src: url("../fonts/hello-hy.woff2?v=1") format("woff2");
  font-weight: 900;
  font-display: swap;
  unicode-range: U+0532, U+0561, U+0580, U+0587;
}

@font-face {
  font-family: "Hello";
  src: url("../fonts/hello-ru.woff2?v=1") format("woff2");
  font-weight: 900;
  font-display: swap;
  unicode-range: U+041F, U+0432, U+0435, U+0438, U+0440, U+0442;
}

@font-face {
  font-family: "Hello";
  src: url("../fonts/hello-ja.woff2?v=1") format("woff2");
  font-weight: 900;
  font-display: swap;
  unicode-range: U+3053, U+3061, U+306B, U+306F, U+3093;
}

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-body.woff2?v=1") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Site Armenian";
  src: url("../fonts/noto-sans-armenian.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0530-058F, U+FB13-FB17;
}

:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #111;
  --ink-2: #4b4b4b;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --band: #f3f3f1;
  --accent: #ffd23f;
  --accent-hover: #ffdc66;
  --display: "Archivo Expanded", "Hello", "Arial Black", system-ui, sans-serif;
  --body: "Archivo", "Site Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html:lang(hy) {
  --display: "Site Armenian", "Archivo Expanded", "Hello", sans-serif;
  --name-fit: 12.26cqi; --role-ratio: .38802; --years-ratio: .52836;
}
html:lang(en) { --name-fit: 15.6cqi; --role-ratio: .33139; --years-ratio: .43104; }
html:lang(fr) { --name-fit: 11.16cqi; --role-ratio: .46019; --years-ratio: .52119; }
html:lang(es) { --name-fit: 14.43cqi; --role-ratio: .33882; --years-ratio: .36224; }
html:lang(de) { --name-fit: 11.52cqi; --role-ratio: .38599; --years-ratio: .5758; }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;

  @media (prefers-reduced-motion: reduce) {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--display);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  margin-bottom: 40px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.skip:focus {
  top: 12px;
  z-index: 12;
}

.wrap {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(64px, 8vw, 96px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 24px);
  padding-block: 28px;
}

.me {
  font-weight: 600;
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
}

.languages {
  position: relative;
  z-index: 5;
  flex: none;
  margin-inline-start: auto;
}

.sections + .languages { margin-inline-start: 0; }

.languages summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .875rem;
  cursor: pointer;
  list-style: none;
}

.languages summary::-webkit-details-marker { display: none; }
.languages summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.languages[open] summary::after { transform: translateY(2px) rotate(225deg); }
.languages ul {
  position: absolute;
  inset-inline-end: 0;
  top: 100%;
  min-width: 10rem;
  margin: 5px 0 0;
  padding: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(0 0 0 / .08);
  list-style: none;
}
.languages a { display: block; padding: 8px 12px; text-decoration: none; border-radius: 5px; }
.languages a:hover, .languages a:focus-visible { background: var(--band); }
.languages [aria-current] { font-weight: 700; text-decoration: underline; }

.breadcrumbs { color: var(--muted); font-size: .875rem; margin-bottom: 16px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›" / ""; margin-inline-end: 6px; }

.top nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--ink);
}

/* Hero */

.hero {
  display: grid;
  grid-template: "intro aside" / 1fr 1fr;
  align-items: center;
  gap: 24px 48px;
  padding-block: 24px 88px;
}

.intro {
  grid-area: intro;
  position: relative;
  z-index: 1;
  container-type: inline-size;
}

/* The longest role line, experience and name align in the fonts used by each language. */
.intro h1 {
  --fs: min(4.75rem, var(--name-fit, 15.6cqi));
  display: grid;
  justify-items: start;
  font-size: var(--fs);
  font-weight: 900;
}

.iam {
  display: block;
  white-space: nowrap;
}

.name {
  padding-inline: 0.1em;
  background: var(--accent);
}

.role {
  display: block;
  margin-top: calc(var(--fs) * 0.34);
  font-size: calc(var(--fs) * var(--role-ratio, .32));
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}
.role > span:not(.visually-hidden) { display: block; }

.years {
  display: block;
  margin-top: calc(var(--fs) * 0.1);
  font-size: calc(var(--fs) * var(--years-ratio, .4311));
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
}

/* Seven greetings, followed by a duplicate of the first for the loop. */
.hello {
  display: block;
  height: 1.3em;
  overflow: clip;
}

.hello-track {
  display: block;
  animation: hello 14s cubic-bezier(0.7, 0, 0.2, 1) infinite;

  @media (prefers-reduced-motion: reduce) {
    animation: none;
  }
}

.hello-track > span {
  display: block;
  height: 1.3em;
  line-height: 1.3;
}

@keyframes hello {
  0%, 11.4% { transform: translateY(0); }
  14.29%, 25.7% { transform: translateY(-12.5%); }
  28.57%, 40% { transform: translateY(-25%); }
  42.86%, 54.3% { transform: translateY(-37.5%); }
  57.14%, 68.6% { transform: translateY(-50%); }
  71.43%, 82.9% { transform: translateY(-62.5%); }
  85.71%, 97.1% { transform: translateY(-75%); }
  100% { transform: translateY(-87.5%); }
}

.bio {
  display: grid;
  gap: 14px;
  max-width: 34em;
  margin-top: 32px;
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
}

.button.quiet {
  background: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

.button.quiet:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* Memberships sit under the portrait as plain links. */

/* Keep both the portrait and memberships visible when a translated bio gets taller. */

.aside {
  grid-area: aside;
  display: grid;
  justify-items: center;
  gap: 28px;
  align-self: stretch;
  align-content: center;
  max-block-size: calc(100svh - 9rem);
  min-block-size: max-content;
  justify-self: end;
  width: min(100%, 520px);
}

.member {
  text-align: center;
}

.member p {
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.member ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Skills under the bio: plain tags, no links. */

.skills {
  margin-top: 28px;
}

.skills p {
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--band);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Webinar hosts right under the headline, so they show on load: each official mark at
   its own height so the three weigh the same. The webinar cards reuse them smaller
   through --logo. */

.hosts {
  margin-top: 30px;
}

.hosts p {
  margin-bottom: 14px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.hosts ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hosts a {
  display: block;
}

.logo {
  --logo: 1;
  width: auto;
}

.logo-sej {
  height: calc(18px * var(--logo));
}

.logo-wix {
  height: calc(20px * var(--logo));
}

.logo-semrush {
  height: calc(27px * var(--logo));
}

/* Portrait: the disc, image mask and canvas share the box's coordinates.
   face.js reads the same numbers (DISC, PAD). */

.portrait {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
}

.disc {
  position: absolute;
  left: 11%;
  top: 21%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
}

.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mask:
    radial-gradient(ellipse 39% 39% at 50% 60%, #000 99.4%, transparent 100%),
    linear-gradient(#000 60%, transparent 60%);
}

.face-canvas {
  position: absolute;
  left: -90%;
  top: -50%;
  width: 250%;
  height: 210%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

.portrait.is-3d .face-canvas {
  opacity: 1;
}

.portrait.is-3d .portrait-img {
  opacity: 0;
}

.face-handle {
  position: absolute;
  left: 26%;
  top: 7%;
  width: 50%;
  height: 66%;
  z-index: 3;
  padding: 0;
  border: 0;
  border-radius: 46% 46% 42% 42%;
  background: none;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.face-handle:active {
  cursor: grabbing;
}

/* Projects: live homepages in a plain browser frame on a tinted band. */

.band {
  background: var(--band);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.project {
  display: block;
  text-decoration: none;
}

.frame {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgb(17 17 17 / 0.1);
}

.address {
  display: block;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

.frame img {
  width: 100%;
  height: auto;
}

.project h3 {
  margin-top: 22px;
  font-size: 1.25rem;
}

.project p {
  color: var(--ink-2);
}

.project:hover .frame {
  box-shadow: 0 0 0 1px var(--ink);
}

.project:hover h3 {
  text-decoration: underline;
}

/* Webinars: the host's own still, its mark as the byline, then the title. Newest first. */

.webinars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.webinar {
  display: block;
  text-decoration: none;
}

.still {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgb(17 17 17 / 0.1);
}

.webinar .logo {
  --logo: 0.8;
  margin-top: 22px;
}

.webinar h3 {
  margin-top: 12px;
  font-size: 1.125rem;
  line-height: 1.35;
}

.webinar p {
  color: var(--ink-2);
}

.webinar:hover .still {
  box-shadow: 0 0 0 1px var(--ink);
}

.webinar:hover h3 {
  text-decoration: underline;
}

/* Services and work. Each service title is a link to its page, underlined in yellow. */

.grid {
  display: grid;
  gap: 36px 56px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid article,
.grid .service {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.grid p {
  color: var(--ink-2);
}

.service {
  display: block;
  text-decoration: none;
}

.service h3 {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.16em;
}

.service:hover h3 {
  text-decoration-color: var(--ink);
}

/* Service pages: the service name takes the hero and the answer follows. The steps are
   a real sequence, so they are numbered; the other lists are not. */

.page {
  padding-block: 24px 0;
}

.page h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 6.4vw, 3.75rem);
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.mark {
  padding-inline: 0.1em;
  background: var(--accent);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  max-width: 34em;
  margin-top: 28px;
  font-size: 1.25rem;
  line-height: 1.5;
}

.page .actions {
  margin-top: 32px;
}

.list,
.steps {
  display: grid;
  gap: 16px;
  max-width: 40em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding-left: 24px;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  background: var(--accent);
}

.steps {
  counter-reset: step;
  gap: 28px;
}

.steps li {
  display: grid;
  grid-template-columns: 2em 1fr;
  gap: 12px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.steps p {
  color: var(--ink-2);
}

/* Writing */

.articles {
  margin: 0;
  padding: 0;
  list-style: none;
}

.articles li {
  border-top: 1px solid var(--line);
}

.articles li:last-child {
  border-bottom: 1px solid var(--line);
}

.articles a {
  display: block;
  padding-block: 16px;
  text-decoration: none;
}

.articles a:hover {
  text-decoration: underline;
}

.more {
  display: inline-block;
  margin-top: 24px;
  font-weight: 600;
}

.foot {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 860px) {
  .hero {
    grid-template: "portrait" "intro" "member" / 1fr;
    row-gap: 40px;
    padding-top: 8px;
  }

  .aside {
    display: contents;
  }

  .aside > .portrait {
    grid-area: portrait;
  }

  .aside > .member {
    grid-area: member;
  }

  .portrait {
    justify-self: center;
    width: min(100%, 420px);
  }

  .member {
    justify-self: start;
    text-align: start;
  }

  .member ul {
    justify-content: start;
  }

  .top nav {
    gap: 20px;
  }

  .webinars {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 861px) {
  .top .me, .top nav a {
    white-space: nowrap;
  }

  html:lang(hy) .top nav {
    gap: clamp(10px, 1vw, 16px);
  }
}

@media (max-width: 1130px) {
  html:lang(hy) .top nav a:not([href$="#services"], [href$="#writing"], [href$="#contact"]) {
    display: none;
  }
}

@media (max-width: 960px) {
  .top nav a:not([href$="#services"], [href$="#writing"], [href$="#contact"]) {
    display: none;
  }
}

@media (max-width: 700px) {
  .projects {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top nav a:not([href$="#contact"]) {
    display: none;
  }

  .hosts ul {
    gap: 12px 24px;
  }

  .hosts .logo {
    --logo: 0.8;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
