/* Romany Said — digital card. No external resources; system fonts only. */

:root {
  color-scheme: light;
  --bg: #eef1f6;
  --surface: #ffffff;
  --ink: #0e1726;
  --muted: #566173;
  --line: #dde3ec;
  --navy: #14264a;
  --navy-ink: #ffffff;
  --band: #14264a;
  --band-2: #23407a;
  --brass: #a8701c;
  --chip: #e6ecf6;
  --chip-ink: #1d3461;
  --focus: #2f6fe0;
  --shadow: 0 1px 2px rgba(14, 23, 38, .06), 0 8px 24px rgba(20, 38, 74, .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a111e;
    --surface: #111b2d;
    --ink: #e7ecf4;
    --muted: #9aa6b9;
    --line: #22304a;
    --navy: #8fb0f0;
    --navy-ink: #0a111e;
    --band: #1a2c52;
    --band-2: #2a4478;
    --brass: #e0b067;
    --chip: #1a2843;
    --chip-ink: #c9d8f5;
    --focus: #8fb0f0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding-block: 28px 40px;
  display: grid;
  gap: 28px;
}

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

/* ── Hero ───────────────────────────── */
.hero {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  background-image: linear-gradient(160deg, var(--band) 0%, var(--band-2) 100%);
  background-size: 100% 92px;
  background-repeat: no-repeat;
  padding: 26px 20px 24px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 4px;
  overflow: hidden;
}
.photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 2px var(--brass), 0 6px 18px rgba(14, 23, 38, .18);
  margin-bottom: 12px;
  background: var(--chip);
}
h1 {
  font-size: 1.85rem;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.role { font-weight: 600; font-size: 1.05rem; }
.focus { color: var(--muted); font-size: .95rem; text-wrap: balance; }
.place {
  margin-top: 6px;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
}

/* ── Summary ────────────────────────── */
.summary {
  font-size: 1.02rem;
  line-height: 1.6;
  text-align: center;
  max-width: 34em;
  margin-inline: auto;
  text-wrap: pretty;
}

/* ── Labels ─────────────────────────── */
.label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Open to ────────────────────────── */
.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  background: var(--chip);
  color: var(--chip-ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .9rem;
  font-weight: 600;
}

/* ── Buttons ────────────────────────── */
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.actions .btn:not(.primary):not(.wide) { padding-inline: 6px; gap: 6px; font-size: .95rem; }
.btn.wide { grid-column: 1 / -1; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--navy); }
.btn:active { transform: scale(.98); }
.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.btn.primary {
  grid-column: 1 / -1;
  background: var(--navy);
  border-color: var(--navy);
  color: var(--navy-ink);
  font-size: 1.05rem;
  min-height: 54px;
}
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.mail {
  margin-top: -18px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  user-select: all;
  overflow-wrap: anywhere;
}

/* ── Stats ──────────────────────────── */
.stats {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
}
.stat + .stat { border-top: 1px solid var(--line); }
.stat strong {
  font-size: 1.3rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: .875rem; color: var(--muted); line-height: 1.45; }

/* ── Skills ─────────────────────────── */
.skills { display: grid; gap: 14px; }
.skills h3, .built h3 { font-size: 1rem; line-height: 1.35; }
.skills p, .built p { color: var(--muted); font-size: .95rem; }

/* ── Built ──────────────────────────── */
.built {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: b;
}
.built li {
  counter-increment: b;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 10px;
}
.built li::before {
  content: counter(b, decimal-leading-zero);
  grid-row: span 2;
  font-size: .8rem;
  font-weight: 700;
  color: var(--brass);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.note {
  margin-top: 14px;
  font-size: .9rem;
  color: var(--muted);
  border-left: 3px solid var(--brass);
  padding-left: 12px;
}

/* ── Certs ──────────────────────────── */
.certs { list-style: none; padding: 0; display: grid; }
.certs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.certs li:first-child { border-top: 1px solid var(--line); }
.certs em {
  font-style: normal;
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Trust footer ───────────────────── */
.trust {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
}
.trust ul { padding-left: 18px; display: grid; gap: 4px; }
.trust li { font-size: .875rem; color: var(--muted); }
.trust b { color: var(--ink); }

/* ── QR overlay (opens with #qr, no JS) ── */
.qr {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 24, .72);
  padding: 16px;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.qr:target { display: flex; }
.qr-box {
  background: #ffffff;
  color: #0e1726;
  border-radius: 20px;
  padding: 24px 20px;
  width: min(340px, 100%);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.qr-box h2 { font-size: 1.15rem; }
.qr-box img { width: 100%; max-width: 260px; height: auto; }
.qr-url { font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.qr-hint { font-size: .85rem; color: #566173; }
.qr-box .btn { width: 100%; background: #14264a; color: #fff; border-color: #14264a; }

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