/* J.D. Forrest design system. Black, white and grey with a subdued flag: muted red and navy
   are the only colors, used as small marks, never as fills behind text.
   Light is the default; dark follows the OS unless the visitor picks one (data-theme on <html>). */
:root{
  --paper:#ffffff;--ink:#141414;--soft:#5b5e64;--line:#e3e3e3;--grey:#f2f2f2;--panel:#f8f8f8;
  --red:#a8323e;--blue:#2c4a78;--mark:#e8121a;
  --stripe-a:#ececec;--stripe-b:#f8f8f8;--canton:#3a4250;--star:rgba(255,255,255,.55);
  --accent:var(--red);--ease:cubic-bezier(.22,1,.36,1);color-scheme:light}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --paper:#121314;--ink:#ebebeb;--soft:#a2a6ad;--line:#2b2d31;--grey:#1c1e21;--panel:#18191c;
  --red:#d9707b;--blue:#8ea7d4;--mark:#ff4d4d;
  --stripe-a:#1f2124;--stripe-b:#17181b;--canton:#2b3240;--star:rgba(255,255,255,.35);color-scheme:dark}}
:root[data-theme="dark"]{
  --paper:#121314;--ink:#ebebeb;--soft:#a2a6ad;--line:#2b2d31;--grey:#1c1e21;--panel:#18191c;
  --red:#d9707b;--blue:#8ea7d4;--mark:#ff4d4d;
  --stripe-a:#1f2124;--stripe-b:#17181b;--canton:#2b3240;--star:rgba(255,255,255,.35);color-scheme:dark}

*{margin:0;padding:0;box-sizing:border-box}html{scroll-behavior:smooth}
body{background:var(--paper);color:var(--ink);font-family:'Inter',sans-serif;font-size:1.06rem;line-height:1.7;-webkit-font-smoothing:antialiased;overflow-x:hidden;transition:background .3s,color .3s}
.wrap{max-width:760px;margin:0 auto;padding:0 28px}a{color:inherit;text-decoration:none}.serif{font-family:'Fraunces',serif;font-weight:400}
@media(max-width:480px){.wrap{padding:0 16px}}
.cur-ring{position:fixed;top:0;left:0;width:30px;height:30px;border:1px solid var(--soft);border-radius:50%;pointer-events:none;z-index:9999;transform:translate(-50%,-50%);transition:width .4s var(--ease),height .4s var(--ease),opacity .4s;opacity:.5}
.cur-ring.grow{width:54px;height:54px;opacity:.9}
@media(hover:none),(pointer:coarse){.cur-ring{display:none}}

/* ---- flag: thin stripe ribbon on top of every page ---- */
.flagbar{height:8px;background:linear-gradient(90deg,var(--canton) 0 120px,transparent 120px),repeating-linear-gradient(180deg,var(--stripe-a) 0 1px,var(--stripe-b) 1px 2px),var(--stripe-a)}
.flagbar::after{content:"";display:block;height:2px;margin-top:4px;background:linear-gradient(90deg,transparent 120px,var(--red) 120px,var(--red) 160px,transparent 160px)}

header.site{padding:28px 0}
.bar{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}
.name{display:inline-flex;align-items:center;min-height:44px}
.logo{height:22px;width:auto;display:block}
/* light/dark artwork pairs: .lt shows in light, .dk in dark, same switch as the theme tokens */
.dk{display:none!important}
:root[data-theme="dark"] .lt{display:none!important}:root[data-theme="dark"] .dk{display:block!important}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .lt{display:none!important}:root:not([data-theme="light"]) .dk{display:block!important}}
.nav{display:flex;align-items:center;flex-wrap:wrap;gap:4px 22px;margin-left:auto}
.nav a{color:var(--soft);font-size:.95rem}.nav a:hover,.nav a[aria-current="page"]{color:var(--ink)}
.nav a[aria-current="page"]{box-shadow:0 2px 0 var(--red)}
.theme-btn{order:3;display:inline-grid;place-items:center;width:44px;height:44px;margin:0 -10px 0 -8px;border:0;background:none;color:var(--soft);cursor:pointer;border-radius:50%}
.theme-btn:hover{color:var(--ink);background:var(--grey)}
.theme-btn svg{width:20px;height:20px}
.theme-btn .moon{display:none}
:root[data-theme="dark"] .theme-btn .sun{display:none}:root[data-theme="dark"] .theme-btn .moon{display:block}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .theme-btn .sun{display:none}:root:not([data-theme="light"]) .theme-btn .moon{display:block}}
@media(max-width:560px){.theme-btn{order:0;margin-left:auto}.nav{order:1;width:100%;gap:2px 16px}.nav a{font-size:.9rem;padding:6px 0}}

.role{color:var(--red);font-size:.85rem;letter-spacing:.12em;text-transform:uppercase;margin-bottom:30px}
.sec{padding:64px 0;border-top:1px solid var(--line)}
.lbl{color:var(--soft);font-size:.82rem;letter-spacing:.12em;text-transform:uppercase;margin-bottom:28px}
.lbl::before,.cv-sec h2::before{content:"";display:block;width:28px;height:3px;background:var(--splash,var(--red));margin-bottom:12px}
footer{padding:70px 0 60px;color:var(--soft);font-size:.88rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}footer a{margin-right:18px}footer a:hover{color:var(--ink)}
.js [data-reveal]{opacity:0;transform:translateY(16px)}
.js [data-reveal].in{opacity:1;transform:none;transition:opacity 1.2s var(--ease),transform 1.2s var(--ease)}
/* anything on screen at load shows at once: the fade is for scrolling, never for the first read */
.js [data-reveal].now{transition:none}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.js [data-reveal]{opacity:1!important;transform:none!important}.cur-ring{display:none}}

/* ---- home: link site ---- */
.links-page{max-width:620px;padding-top:8px;padding-bottom:20px}
.flagcard{position:relative;height:150px;border-radius:12px;overflow:hidden;border:1px solid var(--line);
  background:repeating-linear-gradient(180deg,var(--stripe-a) 0 calc(150px/13),var(--stripe-b) calc(150px/13) calc(300px/13))}
.flagcard .canton{position:absolute;inset:0 auto auto 0;width:40%;height:calc(150px*7/13);background-color:var(--canton);
  background-image:radial-gradient(var(--star) 1.4px,transparent 1.6px),radial-gradient(var(--star) 1.4px,transparent 1.6px);
  background-size:22px 16px;background-position:6px 5px,17px 13px}
.flagcard .rule{position:absolute;left:40%;right:0;top:calc(150px*6/13);height:calc(150px/13);background:var(--red);opacity:.22}
.profile{margin-top:-38px;position:relative;padding:0 6px}
.monogram{width:84px;height:84px;border-radius:50%;background:var(--paper);padding:2px}
.monogram img{width:100%;height:100%}
.profile h1{font-family:'Fraunces',serif;font-weight:400;font-size:clamp(2rem,6vw,2.6rem);line-height:1.15;margin-top:14px}
.vetbadge{display:inline-flex;align-items:center;gap:10px;margin-top:10px;padding:6px 12px 6px 10px;border:1px solid var(--line);border-radius:999px;font-size:.88rem;font-weight:500;background:var(--panel)}
.vetbadge .st{width:14px;height:14px;color:var(--blue)}
.profile .bio{color:var(--soft);margin-top:14px;max-width:52ch}
.linklist{list-style:none;margin:30px 0 0;display:grid;gap:12px}
.linklist a{display:flex;align-items:center;gap:14px;min-height:60px;padding:12px 18px 12px 16px;border:1px solid var(--line);border-left:4px solid var(--splash,var(--red));border-radius:10px;background:var(--panel);transition:transform .25s var(--ease),border-color .25s,background .25s}
.linklist li:nth-child(even) a{--splash:var(--blue)}
.linklist a:hover{transform:translateX(4px);border-color:var(--soft);border-left-color:var(--splash,var(--red))}
.linklist .t{font-weight:600;font-size:1rem;line-height:1.3}
.linklist .d{display:block;font-weight:400;color:var(--soft);font-size:.9rem;margin-top:2px}
.linklist .ar{margin-left:auto;color:var(--soft);font-size:.95rem;flex:none}
.linklist .big a{min-height:72px;background:var(--grey)}
.linklist .big .t{font-family:'Fraunces',serif;font-weight:500;font-size:1.2rem}

/* ---- forms: newsletter + contact ---- */
.form-sec{margin-top:44px;padding:26px 24px 24px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.form-sec h2{font-family:'Fraunces',serif;font-weight:400;font-size:1.5rem;line-height:1.25}
.form-sec>p{color:var(--soft);font-size:.98rem;margin-top:6px;max-width:52ch}
.form-sec>p a{color:var(--ink);border-bottom:1px solid var(--mark)}
.fx{display:grid;gap:12px;margin-top:18px}
.fx label{font-size:.88rem;font-weight:500;color:var(--soft);display:block;margin-bottom:5px}
.fx input,.fx textarea{width:100%;font:inherit;font-size:1rem;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:11px 13px;min-height:46px}
.fx textarea{min-height:130px;resize:vertical;line-height:1.5}
.fx input:focus,.fx textarea:focus,.fx button:focus-visible,.theme-btn:focus-visible,.linklist a:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.fx .row{display:flex;gap:10px;flex-wrap:wrap}.fx .row input{flex:1 1 220px}
.fx button{font:600 .98rem 'Inter',sans-serif;min-height:46px;padding:0 20px;border-radius:8px;border:1px solid var(--ink);background:var(--ink);color:var(--paper);cursor:pointer}
.fx button:hover{background:var(--red);border-color:var(--red)}
.fx button[disabled]{opacity:.6;cursor:wait}
.fx .note{font-size:.92rem;min-height:1.4em;color:var(--soft)}
.fx .note.ok{color:var(--ink)}.fx .note.err{color:var(--red)}
.hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---- prose pages: about, blog posts ---- */
.post{padding:48px 0 30px}
.post-meta{color:var(--soft);font-size:.82rem;letter-spacing:.1em;text-transform:uppercase;margin-bottom:18px}
.post-title{font-family:'Fraunces',serif;font-weight:400;font-size:clamp(2rem,4.5vw,2.9rem);line-height:1.14;letter-spacing:-.01em;margin-bottom:40px;max-width:24ch}
.post-body{font-size:1.12rem}
.post-body p{margin-bottom:26px;color:var(--ink)}
.post-body h2{font-family:'Fraunces',serif;font-weight:500;font-size:1.6rem;margin:48px 0 16px}
.post-body h3{font-family:'Fraunces',serif;font-weight:500;font-size:1.3rem;margin:38px 0 14px}
.post-body a{color:var(--blue);border-bottom:1px solid var(--line)}.post-body a:hover{border-color:var(--blue)}
.post-body ul,.post-body ol{margin:0 0 26px 1.2em}.post-body li{margin-bottom:8px;color:var(--ink)}
.post-body blockquote{border-left:2px solid var(--red);padding-left:22px;margin:32px 0;color:var(--soft);font-family:'Fraunces',serif;font-size:1.25rem}
.post-body code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em;background:var(--grey);padding:2px 6px;border-radius:3px}
.post-body pre{background:#111;color:#eee;padding:18px 20px;border-radius:6px;overflow-x:auto;margin:28px 0;font-size:.9rem}.post-body pre code{background:none;padding:0}
.post-body img{max-width:100%;border-radius:6px;margin:28px 0}
.post-body hr{border:none;border-top:1px solid var(--line);margin:40px 0}
.post-back{display:inline-block;margin-top:48px;color:var(--soft);font-size:.95rem}.post-back:hover{color:var(--red)}
.net a{display:flex;justify-content:space-between;align-items:baseline;padding:18px 0;border-bottom:1px solid var(--line);gap:20px;transition:padding-left .35s var(--ease)}
.net a:first-child{border-top:1px solid var(--line)}.net a:hover{padding-left:10px}.net a:hover .nm{color:var(--red)}
.net .nm{font-family:'Fraunces',serif;font-size:1.2rem;transition:color .3s}.net .ar{color:var(--soft);font-size:.9rem}
.feed-date{color:var(--soft);font-size:.92rem;text-align:right;flex:1}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:0 0 36px}
.facts div{border:1px solid var(--line);border-top:3px solid var(--splash,var(--blue));border-radius:8px;padding:12px 14px;background:var(--panel)}
.facts div:nth-child(odd){--splash:var(--red)}
.facts b{display:block;font-family:'Fraunces',serif;font-weight:500;font-size:1.15rem;line-height:1.25}
.facts span{color:var(--soft);font-size:.88rem}

/* ---- resume ---- */
.cv{padding:40px 0 30px}
.cv .cv-head{padding:0 0 26px;border-bottom:1px solid var(--line);position:relative}
.cv h1{font-size:clamp(2.2rem,5vw,3.2rem);line-height:1.1;letter-spacing:-.01em}
.cv-title{font-size:1.2rem;color:var(--red);font-weight:500;margin-top:6px}
.cv-contact{display:flex;flex-wrap:wrap;gap:4px 22px;margin-top:14px;color:var(--soft);font-size:.95rem}
.cv-contact a{border-bottom:1px solid var(--line)}.cv-contact a:hover{color:var(--blue);border-color:var(--blue)}
.cv-print{position:absolute;top:0;right:0;font:500 .9rem 'Inter',sans-serif;color:var(--ink);background:none;border:1px solid var(--line);border-radius:6px;padding:0 14px;min-height:44px;cursor:pointer}
.cv-print:hover{border-color:var(--blue);color:var(--blue)}
.cv-sec{padding:30px 0 4px}
.cv-sec h2{color:var(--soft);font:500 .82rem 'Inter',sans-serif;letter-spacing:.12em;text-transform:uppercase;margin-bottom:16px}
.cv-sec:nth-of-type(even){--splash:var(--blue)}
.cv-sec p{margin-bottom:10px}
.cv-sec ul{margin:0 0 0 1.1em}.cv-sec li{margin-bottom:7px}
.cv-sec ul.cv-skills{list-style:none;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:6px 36px;font-size:.98rem}
.cv-job{margin-bottom:28px}
.cv-job-head{display:flex;justify-content:space-between;align-items:baseline;gap:14px;flex-wrap:wrap;margin-bottom:8px}
.cv-job h3{font-family:'Fraunces',serif;font-weight:500;font-size:1.22rem}
.cv-job h3::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--splash,var(--red));margin-right:10px;vertical-align:.12em}
.cv-job:nth-of-type(even){--splash:var(--blue)}
.cv-job h3 span{display:block;font-family:'Inter',sans-serif;font-weight:400;font-size:.95rem;color:var(--soft);margin-top:2px}
.cv-dates{color:var(--soft);font-size:.92rem;white-space:nowrap}
@media(max-width:640px){.cv-sec ul.cv-skills{grid-template-columns:1fr}.cv-print{position:static;margin-top:18px}}

@page{size:letter;margin:.42in .5in}
@media print{
  :root,:root[data-theme="dark"]{--paper:#fff;--ink:#141414;--soft:#4d5056;--line:#dcdcdc;--red:#a8323e;--blue:#2c4a78;color-scheme:light}
  .flagbar,header.site,body>footer,.cur-ring,.cv-print{display:none!important}
  .js [data-reveal]{opacity:1!important;transform:none!important}
  body{background:#fff;font-size:9.4pt;line-height:1.36}
  .wrap{max-width:none;padding:0}
  .cv{padding:0}.cv .cv-head{padding-bottom:8px}
  .cv .role{display:none}
  .cv h1{font-size:22pt}.cv-title{font-size:11.5pt;margin-top:2px}
  .cv-contact{font-size:9pt;margin-top:5px;gap:2px 16px}.cv-contact a{border:0}
  .cv-sec{padding:9px 0 0}.cv-sec h2{font-size:8.6pt;margin-bottom:5px;color:var(--ink)}
  .lbl::before,.cv-sec h2::before{width:22px;height:2px;margin-bottom:4px}
  .cv-sec p{margin-bottom:3px}.cv-sec li{margin-bottom:1.5px}
  .cv-sec ul.cv-skills{font-size:9pt;gap:2px 22px}
  .cv-job{margin-bottom:7px;break-inside:avoid}.cv-job-head{margin-bottom:2px}
  .cv-job h3{font-size:10.4pt}.cv-job h3 span{display:inline;font-size:9pt;margin-left:6px}
  .cv-dates{font-size:9pt}
  h2{break-after:avoid}
}

/* ---- editor's mark: the logo red, hand-drawn under ONE phrase per page. It is emphasis, so it stays rare. ---- */
.mark{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.6C38 4.2 88 3.4 128 5.4S182 8.4 198 3.8' fill='none' stroke='%23e8121a' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:100% .3em;background-position:0 96%;padding-bottom:.06em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
:root[data-theme="dark"] .mark{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.6C38 4.2 88 3.4 128 5.4S182 8.4 198 3.8' fill='none' stroke='%23ff4d4d' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E")}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .mark{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.6C38 4.2 88 3.4 128 5.4S182 8.4 198 3.8' fill='none' stroke='%23ff4d4d' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E")}}
.nav a[aria-current="page"]{box-shadow:0 2px 0 var(--mark)}
.post-body a:hover{color:var(--mark);border-color:var(--mark)}
@media print{.mark{background-image:none;padding:0}}

.vbyline{color:var(--soft);font-size:.92rem;line-height:1.55;margin:-22px 0 30px;max-width:62ch}
.vbyline a{color:var(--ink);border-bottom:1px solid var(--mark)}
