/* Vazirmatn v33.003, SIL Open Font License (see fonts/OFL.txt) */
@font-face {
  font-family: Vazirmatn;
  src: url("fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafaf9;
  --text: #1c1917;
  --muted: #6b645e;
  --line: #e7e5e4;
  --accent: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --text: #ededec;
    --muted: #a8a29e;
    --line: #2c2927;
    --accent: #93b4ff;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

/* One column on phones, photo and text side by side on wider screens */
main {
  display: grid;
  gap: 2rem;
  width: 100%;
  max-width: 28rem;
}

@media (min-width: 40rem) {
  main {
    grid-template-columns: 15rem minmax(0, 1fr);
    align-items: center;
    column-gap: 2.5rem;
    max-width: 46rem;
  }
}

.lang-switch {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  text-align: end;
}

header {
  margin-bottom: 2rem;
}

.photo {
  display: block;
  width: 100%;
  max-width: 15rem;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  object-fit: cover;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

header p {
  margin-top: 0.25rem;
  color: var(--muted);
}

h2 {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

ul {
  list-style: none;
}

li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.label {
  width: 5rem;
  color: var(--muted);
}

a {
  color: var(--text);
  overflow-wrap: anywhere;
  text-decoration-color: var(--line);
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Persian */
body:lang(fa) {
  font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  line-height: 1.8;
}

/* Letter spacing breaks the joins between Persian letters */
h1:lang(fa),
h2:lang(fa) {
  letter-spacing: normal;
}

h2:lang(fa) {
  font-size: 0.95rem;
}
