/* Shirley Chan: personal site, v1.
   Plain CSS, no build step. Sections: tokens, base, header, hero, work, lists, studio,
   keep in touch, footer, ornaments, small screens. Dividers: the small tapering fan under the hero,
   the enamel band as the end mark. No hero ornament; no rules above Work, Articles or Talks. */

/* ---------- Tokens: Pearl (light) by default, Peacock (dark) follows the system setting ---------- */
:root {
  --bg:#f5f9f8;
  --card:#ffffff;
  --ink:#0d2b2f;
  --muted:#476467;
  --line:#c6dad7;
  --rule:#6c8b8e;
  --teal:#0b6c70;
  --on-teal:#ffffff;
  --focus:#1d5a96;
  --tag:#e2eeec;
  --mark:#cfe5e2;
  --p-int:#d4ebe7;
  --p-beh:#dcefe3;
  --p-fnd:#e3ecf6;
  --deep:#0d4a4f;
  --on-deep:#ffffff;
  --on-deep-soft:#cfe5e2;
  --on-deep-link:#bfe6e0;
  --eye:#2f9a8b;
  --gold:#8a5e0b;
  --gold-fill:#d8a640;
  --wash-a:rgba(212,235,231,.9); --wash-b:rgba(227,236,246,.8);
  --plume:#1d5a96;
  --emerald:#1c7149;
  --eye-i:#0d4a4f;
  --font-display: "Italiana", "Cormorant Garamond", Garamond, "Iowan Old Style", serif;
  --font-accent: "Cormorant Garamond", "Cormorant", Garamond, "Iowan Old Style", serif;
  --font-sans: "Mulish", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#0a2124;
    --card:#0f2e33;
    --ink:#eaf4f0;
    --muted:#9fbfbb;
    --line:#285158;
    --rule:#5f8a8f;
    --teal:#3fb8b0;
    --on-teal:#062022;
    --focus:#6aa8e4;
    --tag:#173e44;
    --mark:#12474b;
    --p-int:#12474b;
    --p-beh:#134437;
    --p-fnd:#14354f;
    --deep:#0e5157;
    --on-deep:#eaf4f0;
    --on-deep-soft:#cfe5e2;
    --on-deep-link:#bfe6e0;
    --eye:#3fb8b0;
    --gold:#e0b453;
    --gold-fill:#e0b453;
    --wash-a:rgba(47,154,139,.22); --wash-b:rgba(29,90,150,.26);
    --plume:#6aa8e4;
    --emerald:#56c38c;
    --eye-i:#0a2124;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; }
body { margin: 0; font-family: var(--font-sans); font-size: 17px; line-height: 28px; color: var(--ink); background: var(--bg); overflow-x: clip; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }
h2 { font-size: 44px; line-height: 52px; margin-top: 5px; }
a { color: var(--teal); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--gold-fill); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
img { max-width: 100%; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; position: relative; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 5px; z-index: 20; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 13px; line-height: 21px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.only-m { display: none; }
section.s { padding: 55px 0; border-top: 1px solid var(--line); }
#work, #articles, #talks { border-top: 0; padding-top: 34px; }
#follow { border-top: 0; padding-top: 89px; }

/* Framed card: a single gold double rule */
.framed { background: var(--card); border: 1px solid var(--gold-fill); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--gold-fill); border-radius: 34px 5px 34px 5px; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 21px; padding: 13px 24px; max-width: 880px; margin: 0 auto; }
.mk { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.mark { font-family: var(--font-display); font-size: 26px; line-height: 34px; font-weight: 400; color: var(--ink); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 0 5px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav a.in { min-width: 44px; justify-content: center; }
.nav a.in img { display: block; width: 28px; height: 26px; }

/* ---------- Hero and definitions ---------- */
.hero { padding: 89px 0 55px; position: relative; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.18; letter-spacing: -.005em; margin-top: 13px; text-wrap: balance; }
.term { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; margin: 0; }
.js .term { cursor: pointer; text-decoration: underline dotted var(--teal); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.js .term[aria-expanded="true"] { text-decoration-style: solid; }
.term:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.defs { margin-top: 34px; max-width: 720px; }
.def { margin: 0 0 21px; padding-left: 21px; border-left: 2px solid var(--rule); font-size: 16px; line-height: 26px; color: var(--muted); }
.js .def { display: none; }   /* collapsed by default; without script both stay open */
.js .def.open { display: block; }
.def strong { display: block; color: var(--ink); font-size: 17px; }
.def ol { margin: 8px 0 8px 21px; }
.def li { margin: 0 0 5px; }
.def .close { margin: 0; color: var(--ink); }
.divwrap { padding: 21px 0 13px; }

/* ---------- Work ---------- */
.lead { margin: 13px 0 34px; font-size: 19px; line-height: 30px; max-width: 720px; }
.key { list-style: none; margin: 0 0 55px; }
.key li { display: grid; grid-template-columns: 136px 1fr; gap: 0 21px; align-items: baseline; padding: 8px 0; font-size: 19px; line-height: 30px; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 13px; font-size: 14px; line-height: 21px; font-weight: 700; color: var(--ink); }
.p-int { background: var(--p-int); } .p-beh { background: var(--p-beh); } .p-fnd { background: var(--p-fnd); }
.how { font-size: 30px; line-height: 38px; margin: 0 0 21px; }
.layer { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 13px 34px; padding: 34px; margin-bottom: 21px; border: 1px solid var(--line); border-radius: 34px 5px 34px 5px; }
.layer.int { background: color-mix(in srgb, var(--p-int) 55%, var(--card)); }
.layer.beh { background: color-mix(in srgb, var(--p-beh) 55%, var(--card)); }
.layer.fnd { background: color-mix(in srgb, var(--p-fnd) 55%, var(--card)); }
.layer .pill { align-self: start; justify-self: start; }
.nowrap { white-space: nowrap; }
.stmt { margin: 0 0 21px; } .stmt:last-child { margin-bottom: 0; }
.stmt p { font-family: var(--font-display); font-size: 27px; line-height: 35px; color: var(--ink); }
.skills { margin-top: 3px; font-size: 14px; line-height: 21px; color: var(--muted); }
.soonbox { margin-top: 34px; padding: 26px 34px; }
.soon { margin: 0; font-size: 16px; line-height: 26px; color: var(--muted); font-style: italic; }

/* ---------- Articles and talks ---------- */
ul.list { list-style: none; margin-top: 21px; }
ul.list li { display: grid; grid-template-columns: 1fr; column-gap: 0; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.it { font-weight: 700; font-size: 17px; }
span.it { color: var(--ink); }
.venue { display: block; font-size: 14px; line-height: 21px; color: var(--muted); }
.venue a { color: var(--muted); }

/* ---------- Studio band ---------- */
.studio { margin-top: 34px; background: var(--deep); color: var(--on-deep); border-radius: 89px 89px 0 0; padding: 89px 0; }
.studio .eyebrow { color: var(--gold-fill); }
.studio h2 { color: var(--on-deep); }
.dbl { width: 89px; border-top: 1px solid var(--gold-fill); border-bottom: 1px solid var(--gold-fill); height: 3px; margin: 13px 0 0; }
.proj { padding: 26px 0; border-bottom: 1px solid var(--gold-fill); }
.proj:first-of-type { margin-top: 21px; border-top: 1px solid var(--gold-fill); }
.proj h3 { margin: 0 0 5px; }
.proj h3 a { font-size: 32px; line-height: 40px; font-weight: 400; color: var(--on-deep); text-decoration-color: var(--on-deep-link); }
.proj p { max-width: 720px; color: var(--on-deep-soft); }
.ico { display: inline-block; width: .6em; height: .6em; margin-left: 10px; vertical-align: baseline; }
.more { margin-top: 34px; }
.more .lab { display: block; font-size: 13px; line-height: 21px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--on-deep-link); margin-bottom: 8px; }
.more p { padding: 8px 0; }
.more a { color: var(--on-deep); text-decoration-color: var(--on-deep-link); }

/* ---------- Keep in touch ---------- */
.fcard { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: 34px 55px; margin-top: 21px; }
.fcard h2 { margin: 0; }
.fcard .feather { flex: none; display: block; }
.follow { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 21px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 28px; border: 1.5px solid var(--teal); border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--teal); }
a.btn.fill { background: var(--teal); color: var(--on-teal); }

/* ---------- Footer ---------- */
.foot { padding: 34px 0 55px; font-size: 14px; line-height: 21px; color: var(--muted); }
.brandf { display: flex; align-items: center; gap: 13px; }

/* ---------- Ornaments (all aria-hidden) ---------- */
/* Shape colors */
.eo{fill:var(--gold-fill)}.em{fill:var(--plume)}.ei{fill:var(--eye-i)}.eh{fill:var(--emerald)}
.rt{fill:var(--teal)}.rg{fill:var(--gold)}.rgf{fill:var(--gold-fill)}
.ln{fill:none;stroke:var(--gold-fill);stroke-width:1.2;stroke-linecap:round}
.lt{fill:none;stroke:var(--teal);stroke-width:.9;stroke-linecap:round}
.lgt{fill:none;stroke:var(--gold);stroke-width:1;stroke-linecap:round}
.soft{fill:var(--p-int)}.soft2{fill:var(--p-beh)}.card{fill:var(--card)}
.sg{stroke:none}
.mono { display: block; height: auto; }
svg.div { display: block; width: 100%; height: auto; }
.feather .f-body { fill: var(--p-int); stroke: var(--line); stroke-width: 1; }
.feather .f-barb { fill: none; stroke: var(--teal); stroke-width: 1; opacity: .45; }
.feather .f-stem { fill: none; stroke: var(--gold-fill); stroke-width: 1.5; }
.feather .f-ring { fill: none; stroke: var(--gold-fill); stroke-width: 1.25; }
/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; line-height: 26px; }
  .only-m { display: inline; }
  .bar { padding: 0 0 0 24px; }
  .nav { overflow-x: auto; width: 100%; }
  .nav a { padding: 0 6px; }
  .nav a.in { margin-right: 24px; }
  .mk .wm { display: none; }
  .hero { padding: 55px 0 34px; }
  .defs { margin-top: 21px; }
  section.s { padding: 40px 0; }
  h2 { font-size: 34px; line-height: 42px; }
  .key li { grid-template-columns: 1fr; gap: 3px 0; }
  .layer { grid-template-columns: 1fr; padding: 26px 21px; }
  .stmt p { font-size: 24px; line-height: 32px; }
  .soonbox { padding: 21px; }
  .studio { border-radius: 55px 55px 0 0; padding: 55px 0; }
  .studio .eyebrow { color: var(--gold-fill); }
  .proj h3 a { font-size: 28px; line-height: 36px; }
  .fcard { display: block; padding: 26px 21px; }
  .fcard .feather { display: none; }
}

/* ---------- Chosen shapes: capsule frame, lily vine card, enamel band divider, shell halo monogram ---------- */

.fT{fill:var(--teal)}.fB{fill:var(--plume)}.fE{fill:var(--emerald)}.fD{fill:var(--eye-i)}.fP{fill:var(--p-int)}.fQ{fill:var(--p-beh)}.fC{fill:var(--card)}.fG{fill:var(--gold-fill)}.fN{fill:none}
.gl{stroke:var(--gold-fill);stroke-width:1.3;stroke-linejoin:round;stroke-linecap:round}
.gl2{fill:none;stroke:var(--gold-fill);stroke-width:.8;stroke-linecap:round}
.gl3{fill:none;stroke:var(--gold-fill);stroke-width:2;stroke-linecap:round}
.bt{fill:none;stroke:var(--teal);stroke-width:1;stroke-linecap:round}
.bb{fill:none;stroke:var(--plume);stroke-width:1;stroke-linecap:round}
.be{fill:none;stroke:var(--emerald);stroke-width:1;stroke-linecap:round}
.framed.capsule { border-radius: 90px; }
.fcard.capsule { padding: 34px 89px; }
.framed.lilycard { position: relative; border-radius: 8px 34px 8px 34px; min-height: 190px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 34px 34px 34px 110px; }
.lilycard .vine { position: absolute; left: 30px; bottom: 10px; height: calc(100% - 20px); width: auto; pointer-events: none; }
.lilycard .soon { position: relative; }
.mono .ml { fill: var(--gold); }
@media (max-width: 640px) {
  .framed.capsule { border-radius: 55px; }
  .fcard.capsule { padding: 34px 34px; }
  .framed.lilycard { padding: 26px 21px 26px 84px; min-height: 170px; }
}

/* ---------- Round 5: heading rule, end mark, pearl wash ---------- */
section.s h2::after { content: ""; display: block; width: 220px; height: 1px; margin-top: 14px; background: linear-gradient(90deg, var(--gold-fill), transparent); }
section.s .fcard h2::after { display: none; }
.hero { isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(120% 90% at 85% 0%, var(--wash-a), transparent 60%), radial-gradient(90% 80% at 0% 100%, var(--wash-b), transparent 55%);
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
@media (max-width: 640px) { section.s h2::after { width: 160px; } .btn { padding: 0 24px; } }

/* Divider: small shell centered, a single gold line each side tapering out to the column edges. End mark: enamel band. */
.tapdiv { display: flex; align-items: flex-end; }
.tapdiv .el { flex: 1 1 0; min-width: 0; height: 1px; margin-bottom: 4px; }
.tapdiv .el.l { background: linear-gradient(270deg, var(--gold-fill), transparent); }
.tapdiv .el.r { background: linear-gradient(90deg, var(--gold-fill), transparent); }
.tapdiv .fs { flex: none; display: block; width: 60px; height: auto; margin: 0 -10px; position: relative; }
.endwrap { padding-top: 34px; padding-bottom: 0; }
.endwrap svg.div { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .endwrap { overflow: hidden; } .endwrap svg.div { width: 660px; max-width: none; position: relative; left: 50%; transform: translateX(-50%); } }
