:root {
  --bg: #0c0c0e;
  --surface: #151518;
  --surface-2: #1c1c20;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1ea;
  --muted: #aaa69d;
  --accent: #ff6b1a;
  --accent-ink: #0c0c0e;
  --cream: #efeae2;
  --focus: #ffb27d;
  --radius: 20px;
  --gutter: max(16px, env(safe-area-inset-left));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  position: relative;
}
/* One soft warm glow behind the hero, echoing the logo orange. Static, so no repaint cost. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 560px;
  background: radial-gradient(70% 60% at 50% 0%, rgba(255, 107, 26, 0.22), rgba(255, 107, 26, 0) 70%);
  pointer-events: none;
  z-index: -1;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
small { font-size: 0.8125rem; color: var(--muted); }

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

.wrap {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: max(12px, env(safe-area-inset-top)); }

.ic { width: 22px; height: 22px; flex: none; }

/* Top bar */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: 14px;
}
.kicker { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.mark { display: block; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.mark img { width: 100%; height: 100%; }

/* Hero */
.hero { display: grid; gap: 20px; padding-bottom: 8px; }
.photo {
  position: relative; border-radius: 28px; overflow: hidden; background: var(--cream);
  aspect-ratio: 1 / 1; width: 100%;
  box-shadow: 0 24px 60px -24px rgba(255, 107, 26, 0.35);
}
.photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%;
  /* The supplied portrait has a white backdrop; multiply tints it to the logo's cream. */
  mix-blend-mode: multiply;
}
.photo::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to bottom, rgba(12, 12, 14, 0), rgba(12, 12, 14, 0.55));
  pointer-events: none;
}
.intro { display: grid; gap: 8px; }
h1 { font-size: clamp(2.1rem, 9.5vw, 2.75rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 750; }
.roles { display: grid; color: var(--text); font-weight: 560; font-size: 1.0625rem; line-height: 1.4; }
.caps { display: grid; gap: 8px; margin-top: 10px; }
.cap {
  display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; text-decoration: none; color: var(--text);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; min-height: 56px;
}
a.cap:active { transform: scale(0.98); }
@media (hover: hover) { a.cap:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 107, 26, 0.55); } }
.cap .logo { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: var(--cream); display: grid; place-items: center; }
.cap .logo img { width: 100%; height: 100%; object-fit: cover; }
.cap .mono { font-weight: 750; color: var(--accent-ink); font-size: 1.125rem; }
.cap .ct { display: grid; line-height: 1.25; min-width: 0; }
.cap .ct strong { font-weight: 650; font-size: 0.9688rem; }
.cap .ct span { color: var(--muted); font-size: 0.8438rem; overflow-wrap: anywhere; }
.cap .ct i { font-style: normal; color: var(--accent); }
.lede { color: #d6d2c9; margin-top: 10px; max-width: 46ch; }

/* The four tabs */
.actions { display: grid; gap: 10px; }
.action {
  display: grid; grid-template-columns: 44px 1fr 22px; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 16px 10px 12px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; font: inherit; text-align: left; width: 100%; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.action[hidden] { display: none; }
.action .chip {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
}
.action .txt { display: grid; line-height: 1.25; min-width: 0; }
.action strong { font-weight: 650; font-size: 1.0625rem; }
.action small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action > .ic { color: var(--muted); transition: transform 0.18s ease, color 0.18s ease; }
.action:active { transform: scale(0.98); }
.action.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); min-height: 72px; }
.action.primary .chip { background: rgba(12, 12, 14, 0.12); border-color: rgba(12, 12, 14, 0.18); }
.action.primary small, .action.primary > .ic { color: rgba(12, 12, 14, 0.78); }
@media (hover: hover) {
  .action:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.22); }
  .action.primary:hover { border-color: var(--accent); background: #ff7b33; }
  .action:hover > .ic { transform: translate(2px, -2px); color: var(--text); }
  .action.primary:hover > .ic { color: var(--accent-ink); }
}
.share-fallback { display: grid; gap: 6px; }
.share-fallback[hidden] { display: none; }
.share-fallback label { font-size: 0.8125rem; color: var(--muted); }
.share-fallback input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit;
}

/* Sections */
.block { padding-top: 56px; display: grid; gap: 14px; scroll-margin-top: 16px; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 650; }
h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 720; margin-top: -8px; }
h3 { font-size: 1.0625rem; font-weight: 650; line-height: 1.25; }

.grid2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; align-content: start; }
.card .ic { color: var(--accent); width: 26px; height: 26px; }
.card p { color: var(--muted); font-size: 0.9688rem; }
@media (min-width: 350px) { .grid2 { grid-template-columns: 1fr 1fr; } }
@media (hover: hover) { .card { transition: transform 0.2s ease, border-color 0.2s ease; } .card:hover { transform: translateY(-3px); border-color: rgba(255, 107, 26, 0.5); } }

/* Experience */
.years { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(255, 107, 26, 0.16), rgba(255, 107, 26, 0.04)); border: 1px solid rgba(255, 107, 26, 0.35); }
.years .num { font-size: 4.25rem; line-height: 0.9; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); }
.years p { display: grid; line-height: 1.3; }
.years strong { font-size: 1.25rem; }
.years p { color: #d6d2c9; }
.tiles { display: grid; gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
@media (min-width: 520px) { .tiles { grid-template-columns: repeat(3, 1fr); } .tile { display: grid; gap: 2px; align-content: start; padding: 14px 12px; } }
.tile strong { font-size: 1rem; }
.tile span { color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
.steps { display: grid; gap: 0; border-left: 1px dashed rgba(255, 107, 26, 0.5); margin-left: 13px; margin-top: 6px; }
.steps li { position: relative; display: flex; padding: 8px 0 8px 28px; }
.steps li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.steps .step-n {
  position: absolute; left: -14px; top: 8px; width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); border: 1px solid var(--accent);
  font-size: 0.8125rem; font-weight: 700; color: var(--accent);
}
.steps strong { font-weight: 650; }
.steps span:not(.step-n) { color: var(--muted); }

/* Margin Positive */
.mp-card { display: grid; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); align-items: center; }
.mp-logo { width: 120px; height: 120px; border-radius: 16px; }
.mp-head { font-size: 1.1875rem; line-height: 1.3; font-weight: 650; margin-bottom: 8px; }
.mp-card p:not(.mp-head) { color: var(--muted); }
@media (min-width: 480px) { .mp-card { grid-template-columns: 120px 1fr; } }
.places { display: grid; gap: 0; }
.places li { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; position: relative; }
.places li + li::before { content: ""; position: absolute; left: 5px; top: -12px; height: 26px; border-left: 1px dashed rgba(255, 107, 26, 0.5); }
.places .pin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--accent); margin-top: 7px; flex: none; background: var(--bg); }
.places div { display: grid; line-height: 1.3; }
.places strong { font-weight: 600; }
.link-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; justify-self: start;
  border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-weight: 650;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.link-btn .ic { width: 18px; height: 18px; }
.link-btn:active { transform: scale(0.98); }
@media (hover: hover) { .link-btn:hover { background: var(--accent); color: var(--accent-ink); } }

/* Contact */
.who { display: grid; line-height: 1.3; }
.who span { color: var(--muted); }
.rows { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; text-decoration: none; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
.rows a:active { background: var(--surface-2); }
.rows .ic { color: var(--accent); }
.rows span { display: grid; line-height: 1.3; min-width: 0; }
@media (hover: hover) { .rows a:hover { background: var(--surface-2); } }
.action.solo { margin-top: 4px; min-height: 68px; }
.qr { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px; border-radius: var(--radius); border: 1px dashed var(--line); }
.qr img { width: 132px; height: 132px; border-radius: 12px; flex: none; background: #fff; }
.qr p { color: var(--muted); font-size: 0.9375rem; display: grid; }
.qr strong { color: var(--text); }

.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 40px; color: var(--muted); font-size: 0.875rem; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9375rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Plain text pages (privacy, 404) */
.doc .prose { padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: 48px; display: grid; gap: 14px; max-width: 680px; }
.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.25rem; margin-top: 14px; }
.prose p { color: #d6d2c9; }
.prose a { color: var(--focus); }
.prose .meta { color: var(--muted); font-size: 0.875rem; }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* Desktop: still a card, never a stretched mobile page */
@media (min-width: 880px) {
  .wrap { max-width: 960px; }
  .hero { grid-template-columns: 340px 1fr; grid-template-areas: "photo intro" "photo tabs"; column-gap: 40px; row-gap: 20px; align-items: start; }
  .photo { grid-area: photo; max-height: none; aspect-ratio: 4 / 5; }
  .intro { grid-area: intro; padding-top: 16px; }
  .actions { grid-area: tabs; }
  .block, .foot { max-width: 720px; margin-inline: auto; width: 100%; }
  .grid2 { grid-template-columns: 1fr 1fr; }
}

/* Gentle entrance, skipped when the OS asks for less motion */
@media (prefers-reduced-motion: no-preference) {
  .photo { animation: rise 0.45s ease-out both; }
  .intro { animation: rise 0.4s 0.08s ease-out both; }
  .actions { animation: rise 0.4s 0.16s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
@media (forced-colors: active) { .action, .card, .rows, .tile, .mp-card { border: 1px solid CanvasText; } }
