:root {
  --welford-blue: #0d4d83;
  --welford-cyan: #25a5d8;
  --text: #20252c;
  --muted: #5e6670;
  --card-bg: #ffffff;
  --page-bg: #eef3f7;
  --border: #d8e1e8;
  --shadow: 0 18px 45px rgba(13, 77, 131, 0.12);
}

/* Mobile visual theme. Kept after the base breakpoints so desktop is unchanged. */
@media (max-width: 720px) {
  body {
    background: radial-gradient(circle at 50% -8rem, rgba(40,125,255,.2), transparent 24rem),
      linear-gradient(180deg, #f8fbff, #eef4ff);
  }

  .page-shell { width: min(100% - 24px, 480px); padding: 18px 0 30px; }
  .business-card {
    min-height: 0;
    border: 1px solid rgba(31,111,235,.09);
    border-radius: 26px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 22px 55px rgba(25,79,160,.13);
  }
  .accent-strip { display: none; }
  .card-content { padding: 30px 22px 26px; }

  .profile-photo {
    width: clamp(122px, 36vw, 156px);
    border: 6px solid #fff;
    box-shadow: 0 0 0 2px rgba(31,111,235,.1), 0 14px 30px rgba(30,94,190,.2);
  }
  .identity h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.05; }
  .role { color: #64738b; font-size: clamp(17px, 4.7vw, 22px); }
  .brand { width: 142px; margin-top: 22px; }
  .company-block { margin-top: 28px; }
  .company-block h2 { color: #123f83; font-size: clamp(20px, 5.7vw, 24px); }

  .address,
  .contact-item {
    position: relative;
    min-height: 54px;
    padding: 13px 13px 13px 49px;
    border: 1px solid rgba(31,111,235,.09);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(30,85,165,.07);
  }
  .address { margin-bottom: 10px; color: #334158; font-size: 15px; }
  .contact-list { font-size: 15px; line-height: 1.45; }
  .contact-list > .contact-item { display: block; margin-top: 10px; }
  .contact-list dt {
    margin-bottom: 2px;
    color: #8290a5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .contact-list dd { margin: 0; color: #263650; }

  .address::before,
  .contact-item::before {
    position: absolute;
    top: 50%;
    left: 15px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #1670f8;
    font-size: 18px;
    transform: translateY(-50%);
  }
  .address::before { content: "●"; font-size: 12px; }
  .contact-item[data-type="mobile"]::before { content: "☎"; }
  .contact-item[data-type="email"]::before { content: "✉"; }
  .contact-item[data-type="web"]::before { content: "●"; font-size: 12px; }

  .actions { margin-top: 14px; }
  .primary-button, .action-button { min-height: 54px; border-radius: 15px; }
  .primary-button {
    background: linear-gradient(135deg, #1477ff, #0757d9);
    box-shadow: 0 10px 24px rgba(13,103,235,.25);
  }
  .secondary-actions { gap: 10px; margin-top: 10px; }
  .action-button {
    border-color: rgba(31,111,235,.1);
    background: rgba(255,255,255,.94);
    box-shadow: 0 6px 18px rgba(30,85,165,.07);
  }
  .qr-section {
    margin-top: 18px;
    border-color: rgba(31,111,235,.1);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 28px rgba(30,85,165,.08);
  }
}

@media (max-width: 430px) {
  .card-content { padding: 26px 17px 22px; }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(37,165,216,.11), transparent 33rem),
    var(--page-bg);
}

a {
  color: inherit;
}

.page-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 42px 0 32px;
}

.business-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.75 / 1;
  max-height: 560px;
  min-height: 390px;
  background: var(--card-bg);
  border: 1px solid rgba(13, 77, 131, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.accent-strip {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5.8%;
  background: linear-gradient(180deg, #26a6d8 0%, #4dbadd 100%);
}

.card-content {
  position: relative;
  height: 100%;
  padding: clamp(34px, 5vw, 72px) clamp(36px, 6vw, 80px) clamp(32px, 5vw, 64px)
    clamp(58px, 9vw, 118px);
}

.identity h1 {
  margin: 0;
  color: var(--welford-blue);
  font-size: clamp(38px, 6vw, 78px);
  line-height: .96;
  letter-spacing: -0.045em;
  font-weight: 730;
}

.identity {
  max-width: 72%;
}

.profile-photo {
  position: absolute;
  z-index: 1;
  top: clamp(28px, 4.2vw, 58px);
  right: clamp(30px, 4.5vw, 62px);
  width: clamp(108px, 17vw, 178px);
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #e8eff4;
  box-shadow: 0 9px 25px rgba(13, 77, 131, .22);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 27%;
}

.role {
  margin: 14px 0 0;
  font-size: clamp(18px, 2.75vw, 38px);
  line-height: 1.2;
  font-weight: 350;
  color: #292d31;
}

.company-block {
  position: absolute;
  left: clamp(58px, 9vw, 118px);
  bottom: clamp(36px, 6vw, 76px);
  max-width: 66%;
}

.company-block h2 {
  margin: 0 0 18px;
  color: var(--welford-blue);
  font-size: clamp(18px, 2.5vw, 33px);
  letter-spacing: -0.02em;
}

.address {
  margin: 0 0 14px;
  color: #33383e;
  font-size: clamp(14px, 1.75vw, 23px);
  line-height: 1.35;
}

.contact-list {
  margin: 0;
  font-size: clamp(13px, 1.55vw, 21px);
  line-height: 1.45;
}

.contact-list > div {
  display: grid;
  grid-template-columns: minmax(76px, 0.25fr) 1fr;
  gap: 4px 16px;
  align-items: baseline;
}

.contact-list dt {
  color: #646b72;
}

.contact-list dd {
  margin: 0;
  min-width: 0;
}

.contact-list a {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  color: var(--welford-blue);
  text-decoration: underline;
}

.separator {
  margin: 0 6px;
}

.brand {
  position: absolute;
  right: clamp(34px, 5vw, 70px);
  bottom: clamp(42px, 7vw, 90px);
  width: clamp(155px, 25%, 255px);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.mobile-qr {
  display: none;
}

.actions {
  margin: 26px auto 0;
  width: min(620px, 100%);
}

.primary-button,
.action-button {
  border-radius: 14px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  font: inherit;
}

.primary-button {
  width: 100%;
  gap: 8px;
  padding: 15px 22px;
  background: var(--welford-blue);
  color: #fff;
  box-shadow: 0 9px 22px rgba(13, 77, 131, .18);
}

.primary-button:hover {
  filter: brightness(1.06);
}

.secondary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.action-button {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--welford-blue);
}

button.action-button {
  appearance: none;
}

.action-button:hover {
  border-color: rgba(13,77,131,.45);
  background: #fff;
}

.qr-section {
  width: min(330px, 100%);
  margin: 34px auto 0;
  padding: 20px;
  text-align: center;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.qr-section img {
  display: block;
  width: 190px;
  max-width: 75%;
  margin: 0 auto 10px;
  border-radius: 8px;
}

.qr-section p,
footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

footer {
  text-align: center;
  margin-top: 22px;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 620px);
    padding: 14px 0 28px;
  }

  .business-card {
    aspect-ratio: auto;
    min-height: 0;
    border-radius: 16px;
  }

  .accent-strip {
    width: 14px;
  }

  .card-content {
    display: flex;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 32px 24px 34px 38px;
  }

  .identity {
    order: 2;
    max-width: 100%;
    margin-top: 20px;
    text-align: center;
  }

  .identity h1 {
    font-size: clamp(36px, 10vw, 52px);
    line-height: 1;
  }

  .profile-photo {
    position: relative;
    top: auto;
    right: auto;
    order: 1;
    align-self: center;
    width: clamp(124px, 38vw, 164px);
    border-width: 4px;
  }

  .role {
    max-width: 440px;
    margin: 10px auto 0;
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.3;
  }

  .company-block {
    position: static;
    order: 4;
    margin-top: 30px;
    max-width: 100%;
    text-align: left;
  }

  .company-block h2 {
    margin-bottom: 14px;
    font-size: clamp(20px, 5.7vw, 25px);
  }

  .address {
    font-size: 16px;
    line-height: 1.45;
  }

  .contact-list {
    font-size: 16px;
    line-height: 1.5;
  }

  .contact-list > div {
    grid-template-columns: 70px 1fr;
  }

  .brand {
    position: static;
    order: 3;
    align-self: center;
    width: 150px;
    margin-top: 24px;
  }

  .actions {
    margin-top: 16px;
  }

  .secondary-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .card-content {
    padding: 28px 20px 30px 32px;
  }

  .contact-list > div {
    display: block;
    margin-top: 14px;
  }

  .contact-list dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .contact-list dd {
    margin-top: 1px;
  }

  .separator {
    display: block;
    height: 3px;
    color: transparent;
  }
}

/* Final mobile-only theme overrides; desktop declarations above remain intact. */
@media (max-width: 720px) {
  body {
    background: radial-gradient(circle at 50% -8rem, rgba(40,125,255,.2), transparent 24rem),
      linear-gradient(180deg, #f8fbff, #eef4ff);
  }
  .page-shell { width: min(100% - 24px, 480px); padding: 18px 0 30px; }
  .business-card {
    min-height: 0;
    border: 1px solid rgba(31,111,235,.09);
    border-radius: 26px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 22px 55px rgba(25,79,160,.13);
  }
  .accent-strip { display: none; }
  .card-content { padding: 30px 22px 26px; }
  .profile-photo {
    width: clamp(122px, 36vw, 156px);
    border: 6px solid #fff;
    box-shadow: 0 0 0 2px rgba(31,111,235,.1), 0 14px 30px rgba(30,94,190,.2);
  }
  .identity h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.05; }
  .role { color: #64738b; font-size: clamp(17px, 4.7vw, 22px); }
  .brand { width: 142px; margin-top: 22px; }
  .company-block { margin-top: 28px; }
  .company-block h2 { color: #123f83; font-size: clamp(20px, 5.7vw, 24px); }
  .address, .contact-item {
    position: relative;
    min-height: 54px;
    padding: 13px 13px 13px 49px;
    border: 1px solid rgba(31,111,235,.09);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(30,85,165,.07);
  }
  .address { margin-bottom: 10px; color: #334158; font-size: 15px; }
  .contact-list { font-size: 15px; line-height: 1.45; }
  .contact-list > .contact-item { display: block; margin-top: 10px; }
  .contact-list dt {
    margin-bottom: 2px;
    color: #8290a5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .contact-list dd { margin: 0; color: #263650; }
  .address::before, .contact-item::before {
    position: absolute;
    top: 50%;
    left: 15px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #1670f8;
    font-size: 18px;
    transform: translateY(-50%);
  }
  .address::before { content: "●"; font-size: 12px; }
  .contact-item[data-type="mobile"]::before { content: "☎"; }
  .contact-item[data-type="email"]::before { content: "✉"; }
  .contact-item[data-type="web"]::before { content: "●"; font-size: 12px; }
  .actions { margin-top: 14px; }
  .primary-button, .action-button { min-height: 54px; border-radius: 15px; }
  .primary-button {
    background: linear-gradient(135deg, #1477ff, #0757d9);
    box-shadow: 0 10px 24px rgba(13,103,235,.25);
  }
  .secondary-actions { gap: 10px; margin-top: 10px; }
  .action-button {
    border-color: rgba(31,111,235,.1);
    background: rgba(255,255,255,.94);
    box-shadow: 0 6px 18px rgba(30,85,165,.07);
  }
  .qr-section {
    margin-top: 18px;
    border-color: rgba(31,111,235,.1);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 28px rgba(30,85,165,.08);
  }
}

@media (max-width: 430px) {
  .card-content { padding: 26px 17px 22px; }
}

/* Reference-matched mobile composition. */
@media (max-width: 720px) {
  .card-content {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: 170px;
    margin: 0 0 25px;
  }

  .profile-photo {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: 112px;
  }

  .identity {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    text-align: left;
  }

  .identity h1 {
    font-size: clamp(29px, 8vw, 38px);
    line-height: .98;
    text-transform: uppercase;
  }

  .role {
    margin: 9px 0 0;
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.25;
  }

  .company-block {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) 122px;
    gap: 10px 12px;
    margin-top: 27px;
  }

  .company-block h2 {
    display: none;
  }

  .address {
    grid-column: 1;
    margin: 0;
  }

  .contact-list {
    grid-column: 1;
  }

  .address,
  .contact-item {
    min-height: 49px;
    padding: 11px 10px 11px 43px;
    border-radius: 12px;
  }

  .address::before,
  .contact-item::before {
    left: 12px;
  }

  .contact-list > .contact-item {
    margin-top: 8px;
  }

  .mobile-qr {
    display: flex;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    min-height: 100%;
    margin: 0;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(31,111,235,.1);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(30,85,165,.07);
  }

  .mobile-qr img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-qr figcaption {
    margin-top: 7px;
    color: #64738b;
    font-size: 11px;
    text-align: center;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .secondary-actions {
    display: contents;
  }

  #callButton,
  #emailButton {
    display: none;
  }

  #shareButton {
    min-width: 0;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #1477ff, #0757d9);
    box-shadow: 0 10px 24px rgba(13,103,235,.2);
  }

  .qr-section {
    display: none;
  }
}

@media (max-width: 390px) {
  .card-content {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 15px;
    padding: 24px 15px 20px;
  }

  .profile-photo { width: 94px; }
  .company-block { grid-template-columns: minmax(0, 1fr) 105px; gap: 8px; }
  .address, .contact-item { padding-left: 40px; font-size: 13px; }
}

/* Final mobile layout: logo, identity row, contact stack, QR, action footer. */
@media (max-width: 720px) {
  .business-card {
    max-height: none;
  }

  .card-content {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0 18px;
    align-items: center;
    padding: 25px 20px 24px;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    width: clamp(180px, 52vw, 225px);
    margin: 0 0 24px;
  }

  .profile-photo {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: 108px;
  }

  .identity {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0;
    text-align: left;
  }

  .identity h1 {
    font-size: clamp(27px, 8vw, 38px);
    line-height: 1;
    overflow-wrap: break-word;
  }

  .role {
    margin: 8px 0 0;
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.3;
  }

  .company-block {
    display: block;
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 25px;
  }

  .address,
  .contact-list > .contact-item {
    width: 100%;
    min-height: 52px;
    margin: 0 0 9px;
    padding: 12px 13px 12px 47px;
  }

  .contact-list > .contact-item {
    display: block;
  }

  .contact-list dd {
    overflow-wrap: anywhere;
  }

  .mobile-qr {
    display: flex;
    width: min(190px, 62%);
    min-height: 0;
    margin: 22px auto 0;
    padding: 13px;
    align-items: center;
    border-radius: 18px;
  }

  .mobile-qr img {
    width: 100%;
  }

  .mobile-qr figcaption {
    font-size: 12px;
  }

  .actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 0;
    padding: 12px;
    border: 1px solid rgba(31,111,235,.09);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 30px rgba(25,79,160,.1);
  }

  .actions .primary-button,
  .actions #shareButton {
    min-height: 52px;
    padding: 12px 10px;
    font-size: 15px;
  }

  .actions .secondary-actions {
    display: contents;
    margin: 0;
  }

  #callButton,
  #emailButton {
    display: none;
  }
}

@media (max-width: 390px) {
  .page-shell {
    width: min(100% - 16px, 480px);
  }

  .card-content {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0 14px;
    padding: 21px 15px 20px;
  }

  .brand {
    width: min(185px, 56vw);
    margin-bottom: 20px;
  }

  .profile-photo {
    width: 90px;
    border-width: 4px;
  }

  .identity h1 {
    font-size: clamp(25px, 7.8vw, 32px);
  }

  .address,
  .contact-list > .contact-item {
    padding-left: 43px;
    font-size: 13px;
  }

  .actions {
    gap: 8px;
    padding: 9px;
  }
}
