/* ═══════════════════════════════════════════════════════════════════════
   ASH MALLECK — personal site (ashmalleck.com)
   Standalone identity, independent of PhysicianLabs & UnuMedic.

   Design ethos (from references dougraymondcoaching / ashuravi / aayushjain):
   1. Brutal minimalism — anti-brochure. Hairline rules & negative space, not cards.
   2. Immediate anchoring in proof — hard numbers, not promises.
   3. Frictionless, high-value CTA — one bold action.

   Stark, warm near-black canvas · warm-ivory text · a single tangerine signal
   accent. Inter (clean sans) + JetBrains Mono (systems/labels texture).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── Tokens ── */
:root {
  --bg:      #0B0A09;   /* warm near-black */
  --bg-2:    #131211;   /* faintly elevated */
  --bg-3:    #1A1917;
  --line:    rgba(244,242,237,.11);
  --line-2:  rgba(244,242,237,.055);

  --text:    #F4F2ED;   /* warm ivory */
  --text-2:  #B4B1AA;
  --text-3:  #817E77;
  --text-4:  #56534E;

  --accent:    #F07B3A;   /* tangerine signal — warmth + breakout energy */
  --accent-h:  #E56A26;
  --accent-dim: rgba(240,123,58,.14);
  --accent-bd:  rgba(240,123,58,.34);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --max-w: 1160px;
  --pad: 40px;
  --py: 132px;
}

/* ── Base ── */
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
::selection { background: var(--accent); color: #12100E; }

/* ── Type ── */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; color: var(--text); }
h1 { font-size: clamp(36px, 6.6vw, 82px); }
h2 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -0.03em; line-height: 1.06; }
h3 { font-size: clamp(19px, 2.1vw, 25px); letter-spacing: -0.025em; line-height: 1.2; }
p { font-size: 16.5px; line-height: 1.7; color: var(--text-2); }

/* mono label / kicker */
.kicker { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); display: inline-flex; align-items: center; gap: 12px; }
.kicker::before { content: ''; width: 26px; height: 1px; background: var(--accent); opacity: .8; }
.kicker.bare::before { display: none; }
.accent { color: var(--accent); }
.dim { color: var(--text-3); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: -0.01em; padding: 15px 26px; border-radius: 2px; border: 1px solid transparent; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; white-space: nowrap; line-height: 1; }
.btn .ar { transition: transform .16s ease; }
.btn:hover .ar { transform: translateX(4px); }
.btn-solid { background: var(--accent); color: #14100C; border-color: var(--accent); font-weight: 600; }
.btn-solid:hover { background: var(--accent-h); border-color: var(--accent-h); transform: translateY(-1px); }
.btn-line { background: transparent; color: var(--text); border-color: var(--line); }
.btn-line:hover { border-color: var(--text); background: rgba(244,242,237,.04); }
.btn-lg { padding: 18px 32px; font-size: 16px; }
.btn-xl { padding: 22px 40px; font-size: 18px; border-radius: 2px; }

/* ── Nav ── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(11,10,9,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.nav.scrolled { border-color: var(--line); }
.nav-in { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); height: 78px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .02em; color: var(--text); display: flex; align-items: center; gap: 10px; }
.nav-logo .sq { width: 9px; height: 9px; background: var(--accent); display: block; }
.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--text-3); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { font-size: 13.5px; padding: 10px 18px; }

/* ── Hero ── */
.hero { padding: clamp(44px, 7vh, 88px) 0 clamp(56px, 9vh, 104px); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -10%; right: -5%; width: 620px; height: 620px; background: radial-gradient(circle, rgba(240,123,58,.10) 0%, transparent 64%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; max-width: 1040px; }
.hero .kicker { margin-bottom: 24px; }
.hero h1 { margin-bottom: 26px; }
.hero h1 .l { display: block; }
.hero h1 .l + .l { color: var(--text-2); }
.hero h1 .l.exec { color: var(--text); }
.hero h1 .l.exec .u { color: var(--accent); }
.hero-sub { font-size: clamp(16.5px, 1.8vw, 19px); line-height: 1.6; color: var(--text-2); max-width: 720px; margin-bottom: 22px; }
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-sig { border-left: 2px solid var(--accent); padding-left: 22px; margin-bottom: 34px; max-width: 680px; }
.hero-sig p { font-size: clamp(16.5px, 1.9vw, 20px); font-weight: 500; color: var(--text); line-height: 1.5; letter-spacing: -0.012em; }
.hero-sig .eq { color: var(--accent); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-status { margin-top: 32px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: var(--text-3); display: inline-flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.hero-status .live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); flex-shrink: 0; }
.hero-status a { color: var(--text); border-bottom: 1px solid var(--accent-bd); padding-bottom: 2px; }
.hero-status a:hover { color: var(--accent); }

/* ── Section scaffold ── */
.section { padding: var(--py) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 64px; }
.sec-head .kicker { margin-bottom: 0; }
.sec-head h2 { max-width: 640px; }
.sec-note { font-family: var(--mono); font-size: 12.5px; color: var(--text-4); letter-spacing: .04em; }
.rule { height: 1px; background: var(--line); border: none; }

/* ── PROOF — operated-at + metric ledger ── */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0; }
.proof-row { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.proof-lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-4); flex-shrink: 0; }
.proof-logos { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; }
.proof-logos span { font-size: 17px; font-weight: 500; color: var(--text-2); letter-spacing: -0.02em; }

.ledger { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 4px; }
.ledger-cell { padding: 52px 32px 52px 0; border-top: 1px solid var(--line); position: relative; }
.ledger-cell + .ledger-cell { padding-left: 32px; }
.ledger-cell + .ledger-cell::before { content: ''; position: absolute; left: 0; top: 40px; bottom: 40px; width: 1px; background: var(--line-2); }
.ledger-val { font-family: var(--mono); font-weight: 600; font-size: clamp(38px, 4.6vw, 60px); letter-spacing: -0.05em; color: var(--text); line-height: 1; margin-bottom: 16px; }
.ledger-val .u { color: var(--accent); }
.ledger-lbl { font-size: 14px; color: var(--text-3); line-height: 1.5; }
.ledger-lbl b { color: var(--text-2); font-weight: 500; }

/* ── CASE STUDIES — hairline ledger rows ── */
.cases { border-top: 1px solid var(--line); }
.case { display: grid; grid-template-columns: 60px 1fr 200px; gap: 40px; align-items: start; padding: 44px 0; border-bottom: 1px solid var(--line); transition: background .2s ease; position: relative; }
.case:hover { background: rgba(244,242,237,.018); }
.case-idx { font-family: var(--mono); font-size: 13px; color: var(--text-4); letter-spacing: .05em; padding-top: 6px; }
.case:hover .case-idx { color: var(--accent); }
.case-main .case-title { font-size: clamp(21px, 2.4vw, 29px); font-weight: 600; letter-spacing: -0.03em; color: var(--text); margin-bottom: 14px; line-height: 1.12; }
.case-main .case-desc { font-size: 15.5px; color: var(--text-2); line-height: 1.62; max-width: 560px; margin-bottom: 18px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case-tags span { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--text-3); border: 1px solid var(--line); padding: 5px 10px; border-radius: 2px; }
.case-result { text-align: right; padding-top: 4px; }
.case-result .r-val { font-family: var(--mono); font-weight: 600; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.04em; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.case-result .r-lbl { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }

/* ── DEPLOYMENTS — shipped systems grid ── */
.deploys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.deploy { background: var(--bg); padding: 40px; transition: background .2s ease; }
.deploy:hover { background: var(--bg-2); }
.deploy-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.deploy-idx { font-family: var(--mono); font-size: 12px; color: var(--text-4); letter-spacing: .05em; }
.deploy-status { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }
.deploy-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.deploy h3 { margin-bottom: 12px; }
.deploy p { font-size: 14.5px; line-height: 1.62; color: var(--text-2); margin-bottom: 20px; }
.deploy-stack { display: flex; flex-wrap: wrap; gap: 7px; }
.deploy-stack span { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: .03em; }
.deploy-stack span:not(:last-child)::after { content: '·'; margin-left: 7px; color: var(--text-4); }
.deploy-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--text); letter-spacing: .04em; margin-top: 20px; border-bottom: 1px solid var(--accent-bd); padding-bottom: 4px; transition: gap .15s; }
.deploy-link:hover { gap: 13px; }

/* ── HOW I THINK — warm human band ── */
.think { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.think-grid { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; }
.think-aside { position: sticky; top: 110px; }
.think-photo { width: 100%; aspect-ratio: 4/5; border-radius: 3px; overflow: hidden; background: linear-gradient(160deg, var(--bg-3), var(--bg)); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; position: relative; }
.think-photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
.think-photo .mono-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: 56px; color: rgba(244,242,237,.12); z-index: 1; }
.think-name { font-family: var(--mono); font-size: 13px; color: var(--text); margin-top: 18px; letter-spacing: .03em; }
.think-role { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; letter-spacing: .02em; }
.think-body .kicker { margin-bottom: 26px; }
.think-body h2 { margin-bottom: 26px; }
.think-body p { font-size: 18px; line-height: 1.75; color: var(--text-2); margin-bottom: 20px; max-width: 640px; }
.think-body p strong { color: var(--text); font-weight: 500; }
.think-punch { font-size: clamp(21px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.03em; color: var(--text); line-height: 1.28; margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--line); max-width: 680px; }
.think-punch .u { color: var(--accent); }

/* principles inline list */
.principles { margin: 30px 0 8px; }
.principle { display: grid; grid-template-columns: 30px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-2); }
.principle:first-child { border-top: none; }
.principle .p-n { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 4px; }
.principle .p-t { font-size: 16px; color: var(--text-2); line-height: 1.6; }
.principle .p-t b { color: var(--text); font-weight: 600; }

/* ── CTA — bold, frictionless ── */
.cta { padding: clamp(96px, 16vh, 176px) 0; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(240,123,58,.12) 0%, transparent 66%); pointer-events: none; }
.cta-in { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.cta .kicker { margin-bottom: 34px; justify-content: center; }
.cta h2 { font-size: clamp(34px, 6vw, 72px); margin-bottom: 30px; }
.cta h2 .u { color: var(--accent); }
.cta-sub { font-size: 19px; color: var(--text-2); max-width: 560px; margin: 0 auto 46px; line-height: 1.6; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: center; }
.cta-alt { margin-top: 30px; font-family: var(--mono); font-size: 13px; color: var(--text-3); letter-spacing: .03em; }
.cta-alt a { color: var(--text); border-bottom: 1px solid var(--accent-bd); padding-bottom: 2px; }
.cta-alt a:hover { color: var(--accent); }

/* ── Footer ── */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-in { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { font-size: 19px; font-weight: 500; color: var(--text-2); max-width: 380px; line-height: 1.55; letter-spacing: -0.015em; }
.footer-nav { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-nav a { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); letter-spacing: .04em; transition: color .15s; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; color: var(--text-4); letter-spacing: .04em; }

/* ── Reveal ── */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.rise.in { opacity: 1; transform: none; }
.d1 { transition-delay: .07s; } .d2 { transition-delay: .14s; } .d3 { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* ── Responsive ── */
@media (max-width: 940px) {
  :root { --py: 96px; --pad: 26px; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell:nth-child(3) { border-top: 1px solid var(--line); }
  .case { grid-template-columns: 40px 1fr; gap: 22px; }
  .case-result { grid-column: 2; text-align: left; padding-top: 4px; }
  .case-result .r-val { font-size: 26px; }
  .deploys { grid-template-columns: 1fr; }
  .think-grid { grid-template-columns: 1fr; gap: 40px; }
  .think-aside { position: static; display: flex; align-items: center; gap: 22px; }
  .think-photo { width: 128px; flex-shrink: 0; }
  .think-name, .think-role { margin-top: 0; }
}
@media (max-width: 600px) {
  :root { --py: 76px; --pad: 20px; }
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .ledger { grid-template-columns: 1fr; }
  .ledger-cell { padding: 34px 0 !important; }
  .ledger-cell + .ledger-cell::before { display: none; }
  .proof-row { gap: 18px; }
  .sec-head { margin-bottom: 44px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .think-aside { flex-direction: column; align-items: flex-start; }
}

/* ── Landing background portrait (fixed, monochrome, subtle) ── */
.face-bg {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(58vw, 720px);
  z-index: -1; pointer-events: none;
  background: url('../assets/ash-headshot.jpg') no-repeat right center;
  background-size: cover;
  filter: grayscale(1) brightness(1.5) contrast(1.08);
  mix-blend-mode: screen;          /* light parts of the face emerge from the black; dark bg disappears */
  opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
}
@media (max-width: 768px) {
  .face-bg { width: 96vw; opacity: .40;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 72%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 72%); }
}
@media (prefers-reduced-motion: reduce) { .face-bg { /* still fine — it's fixed, no motion */ } }

/* ── Hero sub-line 2 (positioning statement) ── */
.hero-sub-2 { display: block; margin-top: 15px; font-size: 16px; font-weight: 500; color: var(--text-2); letter-spacing: -0.01em; line-height: 1.55; }
.hero-sub-2 strong { color: var(--text); font-weight: 600; }

/* ── Subpages (Deployments / How I think) ── */
.page-top { padding: clamp(52px, 9vh, 92px) 0 8px; }
.back-home { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px; transition: color .15s; }
.back-home:hover { color: var(--accent); }
.back-home .ar { transition: transform .15s; }
.back-home:hover .ar { transform: translateX(-3px); }
.page-lead { font-size: clamp(17px, 1.9vw, 20px); color: var(--text-2); max-width: 660px; margin-top: 18px; line-height: 1.6; }
.subpage-sec { padding-top: clamp(58px, 10vh, 108px); }
.more-links { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--text-3); margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); }
.more-links a { color: var(--text); border-bottom: 1px solid var(--accent-bd); padding-bottom: 2px; margin: 0 4px; }
.more-links a:hover { color: var(--accent); }

/* ── Intro modal (two-option "Book an intro") ── */
body.modal-open { overflow: hidden; }
.btn-full { width: 100%; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(6,6,7,.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative; width: 100%; max-width: 460px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 38px 34px 30px; box-shadow: 0 40px 120px rgba(0,0,0,.6);
  transform: translateY(10px); transition: transform .2s ease; max-height: 92vh; overflow-y: auto;
}
.modal-overlay.open .modal-card { transform: none; }
.modal-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; font-size: 24px; line-height: 1; color: var(--text-3); border-radius: 4px; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.modal-title { font-size: clamp(21px, 3vw, 27px); margin: 14px 0 26px; letter-spacing: -0.03em; }
.intro-opt-label { display: flex; align-items: center; gap: 11px; font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 13px; }
.intro-opt-label .num { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #14100c; font-family: var(--mono); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.intro-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.intro-form input { width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 2px; color: var(--text); font-size: 15px; outline: none; transition: border-color .15s; font-family: var(--sans); }
.intro-form input:focus { border-color: var(--accent); }
.intro-form input::placeholder { color: var(--text-4); }
.intro-error { color: #ff8a5c; font-size: 12.5px; margin: 0 0 10px; }
.intro-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.intro-or::before, .intro-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.intro-or span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-4); }
.intro-note { font-size: 12px; color: var(--text-4); text-align: center; margin-top: 16px; line-height: 1.5; }
.intro-success { text-align: center; padding: 24px 0 12px; }
.intro-success .sdot { width: 58px; height: 58px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 18px; }
.intro-success h3 { font-size: 22px; margin-bottom: 8px; }
.intro-success p { font-size: 14.5px; color: var(--text-2); }
@media (max-width: 480px) { .intro-fields { grid-template-columns: 1fr; } .modal-card { padding: 32px 24px 24px; } }
