:root {
  --bg: #123C33;
  --bg-rgb: 18 60 51;
  --surface: #F5F3EC;
  --surface-rgb: 245 243 236;
  --surface-raised: #FFFEFA;
  --surface-raised-rgb: 255 254 250;
  --line: #D9D4C8;
  --line-rgb: 217 212 200;
  --text: #123C33;
  --text-rgb: 18 60 51;
  --text-muted: #5C6B64;
  --text-muted-rgb: 92 107 100;
  --accent: #D7EF9E;
  --accent-rgb: 215 239 158;
  --accent-strong: #0E2E27;
  --accent-strong-rgb: 14 46 39;
  --accent-text: #123C33;
  --accent-text-rgb: 18 60 51;
  --on-accent: #123C33;
  --on-accent-rgb: 18 60 51;
  --brass: #C4A35A;
  --brass-rgb: 196 163 90;
  --qr-dark: #123C33;
  --qr-dark-rgb: 18 60 51;
  --qr-light: #FFFEFA;
  --qr-light-rgb: 255 254 250;
}
/* Signature Search — forest / ivory / citrus compact NFC card
   Distinct from Santhosh navy/orange and Tekgen midnight sapphire. */

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

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(215, 239, 158, 0.22), transparent 55%),
    linear-gradient(165deg, #0e2e27 0%, #123c33 42%, #1a4a40 100%);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0.9rem 0.85rem 1.5rem;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 0.75rem; top: 0.75rem; z-index: 40;
  transform: translateY(-180%);
  background: var(--surface); color: var(--text);
  padding: 0.5rem 0.85rem; border-radius: 999px; text-decoration: none;
}
.skip:focus { transform: none; }

.preview-bar {
  max-width: 420px; margin: 0 auto 0.65rem;
  text-align: center; color: rgba(245, 243, 236, 0.72); font-size: 0.75rem;
}

.shell {
  width: min(420px, 100%);
  margin: 0 auto;
}

.card {
  overflow: hidden;
  border-radius: 1.6rem;
  background: var(--surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 28px 55px -28px rgba(0, 0, 0, 0.55);
}

/* —— Hero —— */
.hero {
  padding: 1.1rem 1.15rem 1.25rem;
  background:
    linear-gradient(180deg, #fffcf6 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.brand-chip {
  display: inline-grid;
  place-items: center;
  width: 2.35rem; height: 2.35rem;
  border-radius: 0.7rem;
  background: var(--bg);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nfc-chip {
  width: 2.1rem; height: 2.1rem;
  border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text);
}

.hero-grid {
  display: grid;
  gap: 1.1rem;
  align-items: end;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.name {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.85rem, 7.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

.role {
  margin: 0.45rem 0 0;
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--accent-strong);
}

.lead {
  margin: 0.7rem 0 0;
  max-width: 28ch;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.portrait {
  margin: 0;
  width: min(100%, 220px);
  aspect-ratio: 4 / 5;
  border-radius: 1.15rem 1.15rem 0.35rem 1.15rem;
  overflow: hidden;
  background: #dfe8e4;
  box-shadow:
    0 0 0 1px rgba(18, 60, 51, 0.08),
    0 18px 34px -20px rgba(18, 60, 51, 0.55);
  justify-self: end;
  position: relative;
}

.portrait picture,
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.portrait-fallback {
  display: none;
  position: absolute; inset: 0; place-items: center;
  font-family: Georgia, serif; font-size: 2.6rem; font-weight: 700;
  color: var(--bg); background: #dfe8e4;
}
.portrait.is-fallback .portrait-fallback { display: grid; }
.portrait.is-fallback picture { display: none; }

/* —— Action rows —— */
.actions {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem 0.35rem;
}

.row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  text-decoration: none;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: 0 8px 18px -16px rgba(18, 60, 51, 0.4);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.row:hover {
  border-color: rgba(18, 60, 51, 0.28);
  transform: translateY(-1px);
}

.row-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 800;
  box-shadow: 0 14px 28px -16px rgba(18, 60, 51, 0.55);
}
.row-primary:hover {
  filter: brightness(0.98);
  border-color: transparent;
}

.row-portfolio {
  background: var(--bg);
  border-color: transparent;
  color: #f5f3ec;
}
.row-portfolio .row-meta { color: rgba(245, 243, 236, 0.7); }
.row-portfolio .row-ico,
.row-portfolio .row-go { color: var(--accent); }

.row-ico {
  width: 2rem; height: 2rem;
  border-radius: 0.65rem;
  display: grid; place-items: center;
  background: rgba(18, 60, 51, 0.08);
  color: var(--bg);
}
.row-primary .row-ico {
  background: rgba(18, 60, 51, 0.12);
  color: var(--on-accent);
}

.row-label {
  font-weight: 700;
  font-size: 0.92rem;
}

.row-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  justify-self: end;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-go {
  color: var(--text-muted);
  opacity: 0.75;
  transform: rotate(45deg);
}
.row-primary .row-go { color: var(--on-accent); opacity: 0.85; }

/* —— Share —— */
.share {
  margin: 0.85rem 1.05rem 0;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  overflow: hidden;
}
.share summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 0.95rem;
  font-weight: 700;
  font-size: 0.88rem;
}
.share summary::-webkit-details-marker { display: none; }
.share-body { padding: 0 0.95rem 0.95rem; }
.share-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.share-btns .btn-soft:last-child { grid-column: 1 / -1; }

.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.84rem;
}
.btn-soft:hover { border-color: var(--bg); }

.qr-box { margin: 0; text-align: center; }
.qr-frame {
  width: 148px; height: 148px; margin: 0 auto;
  padding: 0.45rem; border-radius: 0.85rem;
  background: #fff; border: 1px solid var(--line);
}
.qr-frame svg { width: 100%; height: 100%; }
.qr-box figcaption {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.toast {
  min-height: 1.1rem;
  margin: 0.55rem 1.05rem 0;
  font-size: 0.8rem;
  color: var(--accent-strong);
  opacity: 0;
  transition: opacity 160ms ease;
}
.toast.show { opacity: 1; }

.foot {
  padding: 1rem 1.15rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.4;
}
.foot .fine {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
}

.notfound {
  min-height: 70vh; display: grid; place-content: center; gap: 0.75rem;
  text-align: center; color: #f5f3ec; padding: 2rem;
}
.notfound a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.65rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700;
}

@media (min-width: 420px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
  .portrait {
    width: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row { transition: none; }
}
