/* Stephen Tao business card — sized in card units (--u); the card is 90u x 54u (90 x 54 mm in print). */
:root{
  --navy-950: #050f1a;
  --navy-900: #071c2e;
  --navy-800: #0b2740;
  --navy-700: #113353;
  --blue-400: #4a8fc2;
  --blue-300: #7fb2d9;
  --foam-100: #eaf4fb;
  --foam-050: #f6fafd;
  --gold-400: #e8b95c;
  --gold-300: #f0cd85;
  --ink-900: #0a1f2f;
  --ink-500: #5c7488;

  --font-base: "PingFang TC","PingFang SC","Microsoft JhengHei","Microsoft YaHei","Noto Sans TC","Noto Sans SC",-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,sans-serif;
  --font-serif: Georgia,"Noto Serif","Liberation Serif","Songti TC","Songti SC",serif;

  --u: min(4.6px, calc((100vw - 32px) / 90));
}

*,*::before,*::after{ box-sizing: border-box; }
html, body{ margin: 0; }
body{
  font-family: var(--font-base);
  color: var(--ink-900);
  background: var(--foam-050);
  -webkit-font-smoothing: antialiased;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
p, h1, ul{ margin: 0; padding: 0; }
a{ color: inherit; text-decoration: none; }

/* Share thumbnail for WeChat (see card.html). Kept rendered at full size but moved off-screen:
   WeChat skips images that are display:none. */
.wx-share-thumb{
  position: absolute;
  left: -10000px;
  top: 0;
  width: 300px;
  height: 300px;
  overflow: hidden;
  pointer-events: none;
}
.wx-share-thumb img{ display: block; width: 300px; height: 300px; }

.page{
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(8 * var(--u));
  padding: 40px 16px;
}

/* ===== Card shell: hero navy gradient + gold net ===== */
.card{
  position: relative;
  width: calc(90 * var(--u));
  height: calc(54 * var(--u));
  border-radius: calc(3 * var(--u));
  overflow: hidden;
  color: var(--foam-100);
  background:
    radial-gradient(ellipse at 22% 12%, rgba(74,143,194,.38), transparent 58%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800) 55%, var(--navy-700));
  box-shadow: 0 18px 40px -18px rgba(5,15,26,.55);
}
.card-net{
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .14;
  /* Diamond net: two line families at ±55°, 7u apart. Drawn as an SVG tile (not stacked
     repeating-linear-gradients) so it survives printing to PDF, where Chromium drops one layer. */
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.5454 12.2041'><path d='M0 0L8.5454 12.2041M0 12.2041L8.5454 0' stroke='%23e8b95c' stroke-opacity='.7' stroke-width='.18' fill='none'/></svg>");
  background-size: calc(8.5454 * var(--u)) calc(12.2041 * var(--u));
}

/* ===== Front ===== */
.card-body{
  position: relative; z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  column-gap: calc(4 * var(--u));
  padding: calc(5.5 * var(--u)) calc(6 * var(--u));
}
/* Row 1: name on the left, 153 AISC on the right, sharing a baseline. */
.card-head{
  grid-column: 1 / -1;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: calc(4 * var(--u));
}
.card-info{ min-width: 0; align-self: center; }
.card-logo{ display: flex; align-items: baseline; gap: calc(1.7 * var(--u)); line-height: 1.05; }
.logo-mark{
  font-family: var(--font-serif);
  font-size: calc(6.4 * var(--u)); font-weight: 700;
  color: var(--gold-400);
}
.logo-text{
  font-size: calc(3.8 * var(--u)); font-weight: 600;
  letter-spacing: .14em;
  color: var(--foam-100);
}
.card-name{
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: calc(6.4 * var(--u)); font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  color: #fff;
}
.card-title{
  margin-top: calc(1.6 * var(--u));
  font-size: calc(2.7 * var(--u)); font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-400);
}
.card-org{
  margin-top: calc(.8 * var(--u));
  font-size: calc(2 * var(--u));
  color: var(--blue-300);
  white-space: nowrap;
}
.card-certs{
  margin-top: 0;
  font-size: calc(1.55 * var(--u));
  letter-spacing: .03em;
  line-height: 1.45;
  color: var(--gold-300);
  white-space: nowrap;
}
.card-certs sup{ font-size: .6em; }
.card-rule{
  display: block;
  width: calc(10 * var(--u)); height: calc(.35 * var(--u));
  margin: calc(2.2 * var(--u)) 0 calc(2.2 * var(--u));
  background: linear-gradient(90deg, var(--gold-400), transparent);
}
.card-contacts{ list-style: none; display: grid; gap: calc(1.3 * var(--u)); }
.card-contacts li{
  display: flex; align-items: center; gap: calc(1.8 * var(--u));
  font-size: calc(2.55 * var(--u));
  line-height: 1.2;
  white-space: nowrap;
}
.card-contact-pair{
  display: inline-flex; align-items: baseline;   /* label sits on the ID's baseline */
  gap: calc(.4 * var(--u));    /* the full-width （ already carries its own leading space */
}
.card-contact-note{
  font-size: calc(1.8 * var(--u));
  letter-spacing: .04em;
  color: var(--blue-300);
}
.card-contacts svg{
  flex: none;
  width: calc(2.8 * var(--u)); height: calc(2.8 * var(--u));
  color: var(--gold-400);
}

.card-qr{
  flex: none;
  display: flex; flex-direction: column; align-items: center;
  gap: calc(1.6 * var(--u));
  align-self: flex-end;
}
.card-qr img{
  display: block;
  width: calc(22 * var(--u)); height: calc(22 * var(--u));
  padding: calc(2.4 * var(--u));         /* quiet zone (~4 modules) */
  background: var(--foam-050);
  border-radius: calc(1.6 * var(--u));
  box-shadow: 0 0 0 calc(.35 * var(--u)) rgba(232,185,92,.55);
}
.card-qr-caption{
  font-size: calc(1.75 * var(--u));
  line-height: 1.35;
  text-align: center;
  color: var(--foam-100);
  opacity: .85;
}
.card-qr-caption em{ font-style: normal; color: var(--blue-300); letter-spacing: .04em; }

/* ===== Back ===== */
.card-back-inner{
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.back-mark{ display: flex; align-items: baseline; gap: calc(2 * var(--u)); line-height: 1; }
.back-153{
  font-family: var(--font-serif);
  font-size: calc(12.5 * var(--u)); font-weight: 700;
  letter-spacing: -.02em;
  color: var(--foam-100);
}
.back-aisc{
  font-size: calc(4.3 * var(--u)); font-weight: 600;
  letter-spacing: .2em;
  color: var(--gold-400);
}
.back-tagline{
  margin-top: calc(3 * var(--u));
  font-size: calc(3.2 * var(--u));
  letter-spacing: .2em;
  color: var(--foam-100);
}
.back-tagline-en{
  margin-top: calc(1 * var(--u));
  font-size: calc(2.1 * var(--u));
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-300);
}
.back-scope{
  margin-top: calc(4.2 * var(--u));
  padding-top: calc(2.6 * var(--u));
  border-top: calc(.18 * var(--u)) solid rgba(232,185,92,.45);
  font-size: calc(2.2 * var(--u));
  line-height: 1.5;
  letter-spacing: .1em;
  color: var(--foam-100);
  opacity: .85;
}
.back-scope-en{
  margin-top: calc(.4 * var(--u));
  font-size: calc(1.8 * var(--u));
  letter-spacing: .04em;
  color: var(--blue-300);
}
.back-company{
  position: absolute; left: 0; right: 0; bottom: calc(3.2 * var(--u));
  font-size: calc(1.75 * var(--u));
  letter-spacing: .08em;
  color: var(--foam-100);
  opacity: .6;
}

/* ===== Certifications ===== */
.certs{
  width: min(100%, calc(90 * var(--u)));
}
.certs h2{
  margin: 0 0 14px;
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .06em;
  color: var(--navy-800);
}
.certs ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cert{
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(11,39,64,.06), 0 6px 18px -12px rgba(11,39,64,.35);
  transition: box-shadow .2s ease, transform .2s ease;
}
.cert:hover{ transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(11,39,64,.5); }
.cert img{ flex: none; width: 56px; height: 56px; object-fit: contain; }
.cert-text{ flex: 1; min-width: 0; display: grid; gap: 2px; }
.cert-name{ font-size: .95rem; font-weight: 600; color: var(--ink-900); line-height: 1.3; }
.cert-meta{ font-size: .8rem; color: var(--ink-500); }
.cert-verify{ flex: none; font-size: .8rem; font-weight: 600; color: var(--blue-400); white-space: nowrap; }
.certs-note{ margin-top: 10px; font-size: .78rem; color: var(--ink-500); text-align: center; }
@media (max-width: 480px){
  .cert-verify{ display: none; }
}

/* ===== WeChat "open in browser" hint (shown by card.js inside WeChat only) ===== */
.wechat-hint{
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 12px 16px 24px;
  background: rgba(5,15,26,.97);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--foam-100);
}
.wechat-hint[hidden]{ display: none; }
.wechat-hint-arrow{
  margin-right: 4px;
  font-size: 56px; line-height: 1;
  color: var(--gold-400);
}
.wechat-hint-box{
  align-self: center;
  max-width: 340px;
  margin-top: 12px;
  text-align: center;
  line-height: 1.7;
}
.wechat-hint-box p{ margin: 0 0 12px; font-size: 1rem; }
.wechat-hint-box b{ color: var(--gold-300); }
.wechat-hint-title{ font-size: 1.25rem !important; font-weight: 700; color: #fff; }
.wechat-hint-en{ font-size: .85rem !important; color: var(--blue-300); }
.wechat-hint-close{ margin-top: 8px; border: 0; }

/* ===== Page actions ===== */
.actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn{
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: .95rem; font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary{ background: var(--gold-400); color: var(--navy-950); }
.btn-primary:hover{ background: var(--gold-300); transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(200,147,58,.7); }
.btn-ghost{ color: var(--navy-800); box-shadow: inset 0 0 0 1.5px var(--navy-800); }
.btn-ghost:hover{ background: var(--navy-800); color: var(--foam-100); }

/* ===== Print: one card per 90 x 54 mm page ===== */
@page{ size: 90mm 54mm; margin: 0; }
@media print{
  :root{ --u: 1mm; }
  body{ background: none; }
  .page{ display: block; min-height: 0; padding: 0; }
  .card{ border-radius: 0; box-shadow: none; break-after: page; }
  .card:last-of-type{ break-after: auto; }
  .actions, .certs, .wechat-hint, .wx-share-thumb{ display: none; }
}
