@font-face {
  font-family: Vazirmatn;
  src: url("assets/Vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #11291f;
  --background-top: #1b3629;
  --ink: #fff5e5;
  --muted: #d4d7c8;
  --line: #ffffff26;
  --panel: #ffffff08;
  --panel-hover: #ffffff12;
  --accent: #eea46b;
  --accent-hover: #ffbd88;
  --accent-ink: #23150c;
  --frame: #d69c6a81;
}

:root[data-theme="green"] {
  --background: #0d2c23;
  --background-top: #163e30;
  --accent: #d9c290;
  --accent-hover: #edd6a5;
  --accent-ink: #13291d;
  --frame: #d9c29080;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  min-block-size: 100svh;
  margin: 0;
  align-items: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 82% 8%, var(--background-top), var(--background) 70%);
  font: 400 1rem/1.7 Vazirmatn, Tahoma, sans-serif;
}

.symbols {
  position: absolute;
}

.card {
  display: grid;
  grid-template: "identity photo" 1fr "actions photo" 1fr / minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2rem clamp(2.5rem, 7vw, 6rem);
  width: min(69rem, calc(100% - 6rem));
  margin-inline: auto;
  padding-block: clamp(3rem, 8vh, 6rem);
}

.identity {
  grid-area: identity;
  align-self: end;
}

.identity-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 550;
}

.identity-label img {
  display: block;
}

h1 {
  margin: 0.55rem 0 0.4rem;
  font-size: clamp(3rem, 6.5vw, 5.25rem);
  font-weight: 850;
  line-height: 1.31;
}

.identity p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.24rem);
}

.portrait {
  --arch: 50% 50% 1.5rem 1.5rem / 42% 42% 1.5rem 1.5rem;
  grid-area: photo;
  align-self: center;
  padding: 0.55rem;
  border: 1px solid var(--frame);
  border-radius: var(--arch);
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 10;
  object-fit: cover;
  object-position: center 60%;
  border-radius: var(--arch);
  background: #15231a;
}

.actions {
  grid-area: actions;
  align-self: start;
  display: grid;
  gap: 0.65rem;
}

.action {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  min-block-size: 4.25rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.92rem;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.action-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

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

@media (hover: hover) {
  .action:hover {
    border-color: var(--frame);
    background: var(--panel-hover);
  }

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

.action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.65rem;
  aspect-ratio: 1;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.action-primary .action-icon {
  background: #22140613;
  border-color: transparent;
  color: inherit;
}

.action-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-text,
.action-note {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.action-title {
  font-size: 1rem;
  font-weight: 700;
}

.action-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: right;
}

.action-primary .action-note {
  color: inherit;
  font-weight: 500;
}

a:active {
  box-shadow: inset 0 0 0 1px currentColor;
}

@media (max-width: 760px) {
  .card {
    grid-template: "identity" "actions" "photo" / minmax(0, 1fr);
    gap: 1.4rem;
    width: min(28rem, calc(100% - 2.5rem));
    padding-block: clamp(1.65rem, 5vh, 3rem);
  }

  .identity {
    text-align: center;
  }

  .identity-label {
    justify-content: center;
  }

  .identity-label img {
    width: 2.2rem;
    height: 2.2rem;
  }

  h1 {
    font-size: clamp(2.55rem, 10.5vw, 3.6rem);
  }

  .portrait {
    --arch: 1.4rem;
    padding: 0.35rem;
  }

  .portrait img {
    aspect-ratio: 1.7;
    object-position: center 42%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action {
    transition: none;
  }
}
