* { box-sizing: border-box; }

:root {
  --ink: #1C2224;
  --red: #A00C0F;
  --graphite: #4C5053;
  --white: #FFFFFF;
}

html { -webkit-text-size-adjust: 100%; }
body, h1, p, figure { margin: 0; }

body {
  min-width: 280px;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--ink);
  color: var(--ink);
  font-family: Inter, sans-serif;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: start center;
}

.card {
  width: min(100%, 29.5rem);
  min-height: 100svh;
  overflow: hidden;
  background: var(--white);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem clamp(1.1rem, 5vw, 2rem);
  background: var(--white);
  border-bottom: 1px solid var(--graphite);
}

.brand {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.top code {
  color: var(--graphite);
  font: 500 8px IBM Plex Mono, monospace;
  letter-spacing: .05em;
}

.profile {
  position: relative;
  overflow: hidden;
  padding: clamp(1.7rem, 6vw, 2.25rem) clamp(1.35rem, 5.8vw, 2rem) clamp(1.8rem, 6vw, 2.35rem);
  background: var(--ink);
  color: var(--white);
  isolation: isolate;
}

.profile::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 38%;
  height: 4px;
  background: var(--red);
}

.profile::after {
  content: "";
  position: absolute;
  z-index: -2;
  right: 0;
  bottom: 0;
  width: 4px;
  height: 40%;
  background: var(--graphite);
}

.grid-art {
  position: absolute;
  z-index: -1;
  left: -18%;
  bottom: -5%;
  width: 94%;
  fill: none;
  stroke: var(--graphite);
  stroke-width: .7;
  opacity: .5;
  transform: rotate(3deg);
}

.grid-art .heavy {
  stroke: var(--red);
  stroke-width: 1.4;
  opacity: .82;
}

.profile-grid {
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(7.8rem, .92fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 1.45rem);
}

.identity {
  min-width: 0;
  align-self: center;
  justify-self: stretch;
  padding-left: clamp(.15rem, 1vw, .35rem);
  text-align: left;
}

.role {
  margin-bottom: .68rem;
  color: var(--white);
  font: 500 clamp(2px, 2vw, 6px)/1.45 IBM Plex Mono, monospace;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.role-dot { color: var(--red); }

h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  color: var(--white);
  font-size: var(--name-size, 42px);
  font-weight: 700;
  line-height: .84;
  letter-spacing: -.065em;
  white-space: nowrap;
}

h1 span { display: block; }

.company {
  max-width: 13rem;
  margin-top: .78rem;
  color: var(--white);
  font: 500 8.5px/1.45 IBM Plex Mono, monospace;
  letter-spacing: .025em;
  opacity: .8;
}

.scope-wrap {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  align-items: stretch;
  gap: .7rem;
  max-width: 13.5rem;
  margin-top: 1rem;
}

.scope-wrap > i {
  display: block;
  width: 3px;
  min-height: 100%;
  background: var(--red);
}

.scope {
  color: var(--white);
  font-size: clamp(10px, 2.55vw, 11.8px);
  font-weight: 500;
  line-height: 1.48;
}

.portrait {
  position: relative;
  width: min(100%, 9.0rem);
  aspect-ratio: .86;
  align-self: center;
  justify-self: end;
  margin-right: clamp(.15rem, 2vw, .70rem);
}

.photo {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: .35rem;
  clip-path: polygon(0 0, 88% 0, 100% 11%, 100% 100%, 12% 100%, 0 89%);
  background: var(--graphite);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
  transform: scale(1.035);
  filter: saturate(.86) contrast(1.06);
}

.portrait::before {
  content: "";
  position: absolute;
  inset: -.42rem;
  border: 1px solid var(--graphite);
  border-radius: .48rem;
}

.corner {
  position: absolute;
  z-index: 3;
  width: 1.1rem;
  height: 1.1rem;
}

.tl {
  top: -.7rem;
  left: -.7rem;
  border-top: 2px solid var(--red);
  border-left: 2px solid var(--red);
}

.br {
  right: -.7rem;
  bottom: -.7rem;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
}

.portrait figcaption {
  position: absolute;
  z-index: 4;
  right: -.35rem;
  bottom: -.45rem;
  display: flex;
  gap: .35rem;
  align-items: center;
  padding: .42rem .55rem;
  border: 1px solid var(--graphite);
  background: var(--white);
  color: var(--ink);
  font: 500 7px IBM Plex Mono, monospace;
  white-space: nowrap;
}

.portrait figcaption i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.contacts {
  margin: 0;
  padding: .35rem clamp(1.1rem, 5vw, 2rem) .55rem;
  background: var(--white);
  border-top: 4px solid var(--red);
}

.contact {
  display: grid;
  grid-template-columns: 1.15rem 2.1rem minmax(0, 1fr) 1rem;
  align-items: center;
  gap: .7rem;
  min-height: 4.4rem;
  padding: .25rem .15rem;
  border-bottom: 1px solid var(--graphite);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}

.contact:hover {
  background: var(--ink);
  color: var(--white);
  margin-inline: -.55rem;
  padding-inline: .7rem;
}

.contact:hover .icon {
  color: var(--red);
}

.contact--primary .num,
.contact--primary .icon,
.contact--primary .arrow {
  color: var(--red);
}

.contact--primary .label b {
  color: var(--red);
}

.contact--primary:hover .num,
.contact--primary:hover .arrow,
.contact--primary:hover .label b {
  color: var(--white);
}

.contact--primary:hover .icon {
  color: var(--red);
}

.num {
  color: var(--graphite);
  font: 600 7.5px IBM Plex Mono, monospace;
}

.icon {
  position: relative;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  color: var(--ink);
}

.icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid currentColor;
  opacity: .28;
}

.icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(5.3rem, .65fr) minmax(0, 1fr);
  align-items: baseline;
  gap: .5rem;
}

.label b {
  font-size: 12px;
  color: currentColor;
}

.label small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: currentColor;
  opacity: .7;
  font: 500 7.5px/1.4 IBM Plex Mono, monospace;
  text-align: right;
}

.arrow { font-size: 1rem; }

footer {
  background: var(--ink);
  color: var(--white);
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 4px solid var(--graphite);
}

.buttons button {
  min-width: 0;
  min-height: 4.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .8rem clamp(.8rem, 5vw, 2rem);
  border: 0;
  border-right: 1px solid var(--graphite);
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.buttons button:hover { background: var(--red); }
.buttons button:last-child { border-right: 0; }
.buttons svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.5; }

.base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem clamp(1.1rem, 5vw, 2rem);
  border-top: 1px solid var(--graphite);
  color: var(--white);
  font: 500 7px IBM Plex Mono, monospace;
  text-transform: uppercase;
  opacity: .72;
}

#toast {
  position: fixed;
  z-index: 10;
  right: 1rem;
  bottom: 1rem;
  max-width: calc(100vw - 2rem);
  padding: .85rem 1rem;
  border-left: 4px solid var(--red);
  background: var(--ink);
  color: var(--white);
  font: 500 9px/1.5 IBM Plex Mono, monospace;
  opacity: 0;
  transform: translateY(1rem);
  transition: .18s;
}

#toast.show { opacity: 1; transform: none; }

@media (min-width: 31rem) {
  .stage { padding: 2rem; }
  .card {
    min-height: auto;
    border: 1px solid var(--graphite);
    border-radius: .4rem;
  }
}

@media (max-width: 23rem) {
  .profile {
    padding-inline: 1.15rem;
  }

  .profile-grid {
    grid-template-columns: minmax(0, 1fr) 7.25rem;
    gap: .85rem;
  }

  .identity {
    padding-left: .1rem;
  }

  .portrait {
    width: 7.15rem;
    margin-right: .1rem;
  }

  .role {
    font-size: 7px;
    letter-spacing: .045em;
  }

  .company {
    font-size: 7.7px;
  }

  .scope {
    font-size: 9.5px;
  }

  .scope-wrap {
    gap: .55rem;
    margin-top: .8rem;
  }

  .contact {
    grid-template-columns: .9rem 1.9rem minmax(0, 1fr) .8rem;
    gap: .45rem;
  }

  .icon { width: 1.9rem; height: 1.9rem; }
  .label { grid-template-columns: 1fr; gap: .08rem; }
  .label small { text-align: left; }
  .base { flex-direction: column; gap: .2rem; }
}

.brand--logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(62%, 14rem);
  height: clamp(2.1rem, 8vw, 2.8rem);
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}
