/* ===========================================================
   Ruth-Anne Pai — personal site
   Dark theme; teal / coral / sage accents on a deep-midnight ground.
   =========================================================== */

:root{
  /* accents (brightened for dark ground) */
  --teal:#2bb6c0;          /* primary accent / links */
  --teal-dark:#5fd0d8;     /* hover (lighter on dark) */
  --teal-darker:#8fe0e6;   /* brightest */
  --coral:#f0806a;         /* warm accent */
  --coral-dark:#f59a86;
  --sage:#7cc08c;          /* third accent */
  --gold:#e8b64c;          /* warning / occasional */

  /* dark ground */
  --bg:#0a1722;            /* page background (deep midnight) */
  --bg-2:#0e1e2b;          /* alt section background */
  --panel:#132636;         /* card surface */
  --panel-2:#172c3e;       /* raised / hover surface */
  --mist:#12303a;          /* teal-tinted callout panel */

  /* text on dark */
  --navy:#eaf1f5;          /* headings / primary text */
  --slate:#a7b7c4;         /* secondary text */
  --faint:#7d8f9d;         /* tertiary / captions */
  --line:#22394a;          /* subtle hairline: internal dividers */
  --edge:#5a7891;          /* crisper edge (>=3:1): card/figure/table boundaries */
  --white:#ffffff;
  --focus:#8fe0e6;         /* keyboard focus ring */

  --shadow:0 1px 3px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.30);
  --shadow-lg:0 6px 18px rgba(0,0,0,.42), 0 22px 56px rgba(0,0,0,.40);
  --radius:14px;
  --radius-sm:9px;
  --maxw:1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}

/* ---------- accessibility: keyboard focus & skip link ---------- */
/* Visible focus ring for keyboard users (WCAG 2.4.7). :focus-visible
   keeps it off for mouse clicks but on for Tab navigation. */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, [tabindex]:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:3px;
  border-radius:6px;
}
/* Fallback for browsers without :focus-visible */
a:focus, button:focus{outline:3px solid var(--focus);outline-offset:3px;}
a:focus:not(:focus-visible), button:focus:not(:focus-visible){outline:none;}

.skip-link{
  position:absolute;left:12px;top:-46px;z-index:100;
  background:var(--teal);color:#062028;font-weight:700;
  padding:10px 18px;border-radius:0 0 9px 9px;
  transition:top .15s;
}
.skip-link:focus{top:0;text-decoration:none;color:#062028;}
body{
  margin:0;
  font-family:var(--font);
  color:var(--slate);
  background:var(--bg);
  line-height:1.6;
  font-size:17px;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--teal);text-decoration:none;}
a:hover{color:var(--teal-dark);text-decoration:underline;}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 24px;}
.narrow{max-width:820px;}

h1,h2,h3,h4{line-height:1.22;color:var(--navy);font-weight:700;letter-spacing:-.01em;}
h1{font-size:2.6rem;margin:.2em 0 .35em;}
h2{font-size:1.85rem;margin:1.8em 0 .6em;}
h3{font-size:1.25rem;margin:1.4em 0 .4em;color:var(--navy);}
p{margin:.7em 0;}
.lead{font-size:1.22rem;color:var(--slate);line-height:1.55;}
strong{color:var(--navy);}
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.78rem;font-weight:700;color:var(--teal);margin-bottom:.5em;}
.muted{color:var(--faint);}
.small{font-size:.9rem;}
.center{text-align:center;}

/* ---------- top nav ---------- */
header.site{
  position:sticky;top:0;z-index:50;
  background:rgba(10,23,34,.85);
  backdrop-filter:saturate(160%) blur(12px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;height:66px;}
.brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:1.15rem;color:var(--navy);letter-spacing:-.02em;}
.brand:hover{text-decoration:none;color:var(--navy);}
.brand .mark{width:36px;height:36px;flex:0 0 36px;}
.navlinks{display:flex;gap:4px;align-items:center;flex-wrap:wrap;}
.navlinks a{
  color:var(--slate);font-weight:600;font-size:.95rem;
  padding:8px 13px;border-radius:8px;
}
.navlinks a:hover{color:var(--teal-dark);background:var(--panel);text-decoration:none;}
.navlinks a.active{color:var(--teal-dark);background:var(--panel);}
.nav-toggle{display:none;background:none;border:0;font-size:1.5rem;color:var(--navy);cursor:pointer;}

/* ---------- hero ---------- */
.hero{padding:78px 0 50px;background:
  radial-gradient(1100px 460px at 82% -12%, rgba(43,182,192,.14), transparent 62%),
  radial-gradient(900px 420px at 8% 0%, rgba(240,128,106,.08), transparent 60%),
  linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom:1px solid var(--line);}
.hero .eyebrow{color:var(--teal);}
.hero h1{max-width:15ch;}
.hero .lead{max-width:60ch;}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--teal);color:#062028;font-weight:700;font-size:.98rem;
  padding:12px 22px;border-radius:10px;border:1px solid var(--teal);
  transition:.15s;cursor:pointer;
}
.btn:hover{background:var(--teal-dark);border-color:var(--teal-dark);color:#062028;text-decoration:none;transform:translateY(-1px);}
.btn.ghost{background:transparent;color:var(--teal-dark);border-color:var(--line);font-weight:600;}
.btn.ghost:hover{background:var(--panel);border-color:var(--teal);}
.btn.coral{background:var(--coral);border-color:var(--coral);color:#2a0d07;}
.btn.coral:hover{background:var(--coral-dark);border-color:var(--coral-dark);color:#2a0d07;}
.btn-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px;}

/* ---------- generic sections ---------- */
section{padding:52px 0;}
section.tint{background:var(--bg-2);border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
.section-head{max-width:70ch;margin-bottom:30px;}

/* ---------- cards ---------- */
.grid{display:grid;gap:22px;}
.grid.cols-2{grid-template-columns:repeat(2,1fr);}
.grid.cols-3{grid-template-columns:repeat(3,1fr);}
.grid.cols-4{grid-template-columns:repeat(4,1fr);}
.card{
  background:var(--panel);border:1px solid var(--edge);border-radius:var(--radius);
  padding:26px;box-shadow:var(--shadow);transition:.18s;
  display:flex;flex-direction:column;
}
.card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px);border-color:#31506a;background:var(--panel-2);}
.card h3{margin-top:0;}
.card .tag{
  display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.04em;
  text-transform:uppercase;color:var(--teal-dark);background:rgba(43,182,192,.13);
  padding:3px 9px;border-radius:20px;margin:0 6px 6px 0;
}
.card .tag.coral{color:var(--coral-dark);background:rgba(240,128,106,.14);}
.card .tag.sage{color:var(--sage);background:rgba(124,192,140,.14);}
.card .card-foot{margin-top:auto;padding-top:16px;}

/* audience router cards */
.router{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.rcard{
  background:var(--panel);border:1px solid var(--edge);border-radius:var(--radius);
  padding:26px 24px;box-shadow:var(--shadow);transition:.18s;
  border-top:4px solid var(--teal);
}
.rcard:hover{box-shadow:var(--shadow-lg);transform:translateY(-3px);background:var(--panel-2);}
.rcard.c2{border-top-color:var(--coral);}
.rcard.c3{border-top-color:var(--sage);}
.rcard.c4{border-top-color:var(--teal-darker);}
.rcard.c5{border-top-color:var(--gold);}
.rcard .who{font-size:.8rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);}
.rcard h3{margin:.3em 0 .4em;font-size:1.22rem;}
.rcard .go{margin-top:14px;font-weight:600;color:var(--teal-dark);}
.rcard ul{margin:.5em 0 0;padding-left:1.1em;}
.rcard li{margin:.28em 0;}

/* ---------- figures ---------- */
/* PNGs have light backgrounds — seat them on white so they read cleanly on the dark ground */
figure{margin:26px 0;border:1px solid var(--edge);border-radius:var(--radius);overflow:hidden;background:#fff;box-shadow:var(--shadow);}
figure img{width:100%;background:#fff;display:block;}
figure.pad img{padding:12px;}
figcaption{padding:12px 18px;font-size:.9rem;color:var(--slate);border-top:1px solid var(--line);background:var(--panel);}
.fig-2{display:grid;grid-template-columns:1fr 1fr;gap:22px;}

/* ---------- stat strip ---------- */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:8px 0;}
.stat{background:var(--panel);border:1px solid var(--edge);border-radius:var(--radius-sm);padding:20px;text-align:center;}
.stat .num{font-size:2rem;font-weight:800;color:var(--teal-dark);line-height:1.1;letter-spacing:-.02em;}
.stat .lbl{font-size:.86rem;color:var(--slate);margin-top:4px;}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto;margin:22px 0;border:1px solid var(--edge);border-radius:var(--radius);}
table{border-collapse:collapse;width:100%;font-size:.94rem;background:var(--panel);color:var(--slate);}
th,td{text-align:left;padding:11px 15px;border-bottom:1px solid var(--line);vertical-align:top;}
th{background:var(--bg-2);font-weight:700;color:var(--navy);white-space:nowrap;}
td strong{color:var(--navy);}
tr:last-child td{border-bottom:0;}
tbody tr:hover{background:var(--panel-2);}
.hl td{background:var(--mist);font-weight:600;color:var(--navy);}

/* ---------- lists / steps ---------- */
ol.steps{counter-reset:s;list-style:none;padding:0;margin:24px 0;}
ol.steps>li{
  counter-increment:s;position:relative;padding:4px 0 20px 52px;margin:0;
  border-left:2px solid var(--line);margin-left:18px;
}
ol.steps>li:last-child{border-left-color:transparent;}
ol.steps>li::before{
  content:counter(s);position:absolute;left:-18px;top:0;
  width:34px;height:34px;border-radius:50%;background:var(--teal);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.95rem;
}
ol.steps>li strong{display:block;margin-bottom:2px;}

/* pill list */
.pills{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0;padding:0;list-style:none;}
.pills li{background:var(--mist);color:var(--teal-dark);font-weight:600;font-size:.85rem;padding:6px 13px;border-radius:20px;}

/* ---------- callout ---------- */
.callout{border-left:4px solid var(--teal);background:var(--mist);padding:18px 22px;border-radius:0 var(--radius-sm) var(--radius-sm) 0;margin:22px 0;}
.callout.coral{border-left-color:var(--coral);background:rgba(240,128,106,.10);}
.callout.warn{border-left-color:var(--gold);background:rgba(232,182,76,.10);}
.callout h3{margin-top:0;}

/* code */
code{background:rgba(43,182,192,.10);border:1px solid var(--line);border-radius:6px;padding:.12em .45em;font-size:.9em;font-family:"SF Mono",Menlo,Consolas,monospace;color:var(--teal-darker);}
pre{background:#061219;border:1px solid var(--line);color:#cfe8ea;border-radius:var(--radius-sm);padding:18px 20px;overflow-x:auto;font-size:.9rem;line-height:1.55;}
pre code{background:none;border:0;color:inherit;padding:0;}

/* disclaimer */
.disclaimer{font-size:.85rem;color:var(--faint);font-style:italic;border:1px dashed var(--line);border-radius:var(--radius-sm);padding:16px 20px;margin:26px 0;background:var(--bg-2);}

/* ---------- footer ---------- */
footer.site{background:#061219;color:var(--slate);padding:46px 0 34px;margin-top:20px;border-top:1px solid var(--line);}
footer.site a{color:var(--teal);}
footer.site a:hover{color:var(--teal-dark);}
.foot-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:30px;}
footer.site h4{color:var(--navy);font-size:1rem;margin:0 0 12px;}
footer.site .brand-f{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.2rem;color:var(--navy);margin-bottom:10px;}
footer.site ul{list-style:none;padding:0;margin:0;}
footer.site li{margin:.35em 0;font-size:.92rem;}
.foot-bottom{border-top:1px solid var(--line);margin-top:30px;padding-top:18px;font-size:.83rem;color:var(--faint);}

/* ---------- responsive ---------- */
@media(max-width:900px){
  .grid.cols-3,.grid.cols-4,.router,.stats{grid-template-columns:repeat(2,1fr);}
  .fig-2,.foot-grid{grid-template-columns:1fr;}
  h1{font-size:2.1rem;}
}
@media(max-width:640px){
  .grid.cols-2,.grid.cols-3,.grid.cols-4,.router,.stats{grid-template-columns:1fr;}
  .navlinks{
    display:none;position:absolute;top:66px;left:0;right:0;
    flex-direction:column;background:var(--bg-2);border-bottom:1px solid var(--line);padding:10px 16px;gap:2px;
  }
  .navlinks.open{display:flex;}
  .navlinks a{padding:11px 12px;}
  .nav-toggle{display:block;}
  body{font-size:16px;}
  .hero{padding:48px 0 34px;}
}
