:root{
  --radius-lg: 24px;
  --radius-md: 14px;
  --f-display: 'Fraunces', serif;
  --f-body: 'Figtree', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  --maxw: 760px;
}

/* ---------- theme: dark (default) ---------- */
:root, [data-theme="dark"]{
  --bg:        #111111;
  --panel:     #1a1a1a;
  --panel-2:   #2f2f2f;
  --ink:       #f8f8f8;
  --ink-dim:   #b0b0b0;
  --border:    rgba(255,255,255,.12);
  --accent:    #82ff1f;
  --accent-2:  #c9ff90;
  --on-accent: #111111;
  --dot:       rgba(255,255,255,.07);
  --shadow: 0 16px 40px rgba(0,0,0,.4);
}

/* ---------- theme: light ---------- */
[data-theme="light"]{
  --bg:        #f8f8f8;
  --panel:     #ffffff;
  --panel-2:   #eeeeee;
  --ink:       #111111;
  --ink-dim:   #4f4f4f;
  --border:    rgba(17,17,17,.10);
  --accent:    #2f7a0e;
  --accent-2:  #0f8f63;
  --on-accent: #ffffff;
  --dot:       rgba(17,17,17,.10);
  --shadow: 0 16px 36px rgba(17,17,17,.10);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; scroll-padding-top:6.5rem; }
body{
  font-family:var(--f-body);
  background:var(--bg);
  background-image:radial-gradient(var(--dot) 1.4px, transparent 1.4px);
  background-size:26px 26px;
  color:var(--ink);
  min-height:100vh;
  text-align:center;
  transition:background-color .25s ease, color .25s ease;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ list-style:none; }

::selection{ background:var(--accent); color:var(--on-accent); }
::-moz-selection{ background:var(--accent); color:var(--on-accent); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- subtle catchy motion ---------- */
@keyframes riseIn{
  from{ opacity:0; transform:translateY(14px); }
  to{ opacity:1; transform:translateY(0); }
}
.reveal{ animation:riseIn .6s cubic-bezier(.2,.7,.3,1) both; }
.reveal-1{ animation-delay:.05s; }
.reveal-2{ animation-delay:.15s; }
.reveal-3{ animation-delay:.25s; }


/* ---------- floating pill nav ---------- */
.pillnav-wrap{
  position:sticky;
  top:1.1rem;
  z-index:100;
  display:flex;
  justify-content:center;
  padding:0 1rem;
  margin-bottom:2.5rem;
}
.pillnav{
  display:flex;
  align-items:center;
  gap:.4rem;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:999px;
  padding:.55rem .6rem .55rem 1.2rem;
  box-shadow:var(--shadow);
  max-width:100%;
}
.pillnav .brand{
  font-family:var(--f-display);
  font-weight:600;
  font-size:1.15rem;
  font-style:italic;
  padding-right:.8rem;
  border-right:1px solid var(--border);
  margin-right:.4rem;
  color:var(--ink);
}
.nav-links{ display:flex; align-items:center; gap:.15rem; }
.nav-links a{
  font-family:var(--f-body);
  font-weight:600;
  font-size:.85rem;
  color:var(--ink-dim);
  padding:.5rem .9rem;
  border-radius:999px;
  transition:color .2s ease, background .2s ease;
}
.nav-links a:hover{ color:var(--ink); background:var(--panel-2); }
.nav-links a.active{ color:var(--on-accent); background:var(--accent); }
.nav-toggle{ display:none; }

.theme-toggle{
  margin-left:.5rem;
  width:2.35rem; height:2.35rem;
  border-radius:50%;
  border:1px solid var(--border);
  background:var(--panel-2);
  color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  font-size:1rem;
  flex-shrink:0;
  transition:transform .3s ease, background .2s ease;
}
.theme-toggle:hover{ background:var(--accent); color:var(--on-accent); transform:rotate(18deg); }

/* ---------- centered content ---------- */
main.page{ display:flex; justify-content:center; padding-bottom:5rem; }
.container{ width:100%; max-width:var(--maxw); padding:0 1.4rem; }

.eyebrow{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.72rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--on-accent);
  display:inline-block;
  padding:.35rem 1rem;
  border-radius:999px;
  background:var(--accent);
  margin-bottom:1.3rem;
}

h1{
  font-family:var(--f-display);
  font-weight:600;
  font-size:clamp(2.6rem, 7vw, 5.2rem);
  line-height:1.02;
  letter-spacing:-.01em;
  margin-bottom:1.2rem;
}
h1 .grad{
  background:linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  font-style:italic;
}
h2{
  font-family:var(--f-display);
  font-weight:600;
  font-size:clamp(1.7rem, 3.6vw, 2.3rem);
  margin-bottom:1rem;
}
h3{
  font-family:var(--f-display);
  font-weight:600;
  font-size:1.3rem;
  margin-bottom:.5rem;
}
p{ color:var(--ink-dim); max-width:56ch; margin-left:auto; margin-right:auto; }
p + p{ margin-top:.9rem; }
.lede{ color:var(--ink); font-size:clamp(1.15rem, .5vw + 1rem, 1.35rem); max-width:56ch; margin-left:auto; margin-right:auto; }
.prose-lg{ color:var(--ink); font-size:1.12rem; line-height:1.75; max-width:60ch; margin-left:auto; margin-right:auto; }
.prose-lg + .prose-lg{ margin-top:1.1rem; }

.section{ margin-top:5rem; }

/* ---------- portrait ---------- */
.portrait-wrap{
  display:flex;
  justify-content:center;
  margin-bottom:1.8rem;
}
.portrait{
  width:148px;
  height:148px;
  border-radius:50%;
  overflow:hidden;
  border:3px solid var(--accent);
  box-shadow:var(--shadow);
}
.portrait img{ width:100%; height:100%; object-fit:cover; object-position:50% 29%; }

/* ---------- iframe embed ---------- */
.doc-embed{
  width:100%;
  height:80vh;
  min-height:520px;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:var(--shadow);
  margin-top:1.6rem;
}
.doc-embed iframe{ width:100%; height:100%; border:0; display:block; }
.doc-fallback{
  margin-top:1rem;
  font-size:.9rem;
  color:var(--ink-dim);
}
.doc-fallback a{
  color:var(--accent);
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:.18em;
  transition:color .18s ease, opacity .18s ease;
}
.doc-fallback a:hover{ color:var(--accent-2); opacity:.9; }

/* ---------- panel (terminal / info block) ---------- */
.panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
  padding:2rem;
  margin-top:2.2rem;
  text-align:left;
}
.panel .kicker{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.7rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  display:block;
  margin-bottom:.9rem;
}
.panel .typeline{ font-family:var(--f-mono); font-size:.85rem; color:var(--ink); }
.panel .out{ color:var(--ink-dim); white-space:pre-line; }
.caret{ display:inline-block; width:7px; height:1em; background:var(--accent); vertical-align:middle; animation:blink 1s steps(1) infinite; border-radius:1px; }
@keyframes blink{ 50%{ opacity:0; } }

/* ---------- grids / cards ---------- */
.grid{ display:grid; gap:1.1rem; margin-top:1.8rem; text-align:left; }
.grid.cols-2{ grid-template-columns:repeat(2, 1fr); }

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:1.6rem;
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover{ transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow); }
.card .tag{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  display:inline-block;
  margin-bottom:.7rem;
}
.card p{ font-size:.92rem; margin-left:0; margin-right:0; }
.card h3 a{ color:inherit; transition:color .18s ease; }
.card h3 a:hover{ color:var(--accent); }

.status{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.65rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:.28rem .7rem;
  border-radius:999px;
  display:inline-block;
}
.status.op{ color:var(--on-accent); background:var(--accent); }
.status.dev{ color:var(--ink); background:var(--panel-2); border:1px solid var(--border); }
.status.deployed{ color:var(--on-accent); background:var(--accent-2); }
.status.archived{ color:var(--ink-dim); background:transparent; border:1px solid var(--border); }

/* ---------- buttons (template's full-pill style) ---------- */
.btn{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.86rem;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.85rem 1.7rem;
  border-radius:999px;
  border:1px solid transparent;
  background:var(--accent);
  color:var(--on-accent);
  transition:background .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover{ background:var(--accent-2); transform:translateY(-2px); }
.btn-icon{
  width:1.05em;
  height:1.05em;
  flex-shrink:0;
}
.btn.ghost{
  background:transparent;
  color:var(--ink);
  border-color:var(--border);
}
.btn.ghost:hover{ border-color:var(--accent); color:var(--accent); background:transparent; }
.btn-row{ display:flex; gap:.9rem; flex-wrap:wrap; justify-content:center; margin-top:2rem; }

/* ---------- project / entry list ---------- */
.entry{
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--panel);
  padding:1.9rem;
  margin-bottom:1.2rem;
  text-align:left;
}
.entry-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:.7rem;
}
.entry-id{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ink-dim);
}
.stack{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:1rem; }
.stack span{
  font-family:var(--f-body);
  font-weight:600;
  font-size:.72rem;
  color:var(--ink-dim);
  border:1px solid var(--border);
  padding:.25rem .65rem;
  border-radius:999px;
}

/* ---------- timeline rail (line reaches each pill, then draws around it) ---------- */
.timeline-wrap{
  position:relative;
}
.tl-svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:visible;
  pointer-events:none;
  z-index:3;
}
.tl-track{
  fill:none;
  stroke:var(--border);
  stroke-width:2;
}
.tl-seg{
  fill:none;
  stroke:var(--accent);
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 0 5px var(--accent));
  stroke-dasharray:1;
  stroke-dashoffset:1;
  transition:stroke-dashoffset .9s cubic-bezier(.3,.6,.3,1);
}
.tl-seg.drawn{
  stroke-dashoffset:0;
}
.timeline-wrap .entry{
  position:relative;
  opacity:0;
  transition:opacity .6s ease;
  margin-bottom:3.4rem;
}
.timeline-wrap .entry:last-child{
  margin-bottom:0;
}
.timeline-wrap .entry.in-view{
  opacity:1;
}
@media (max-width: 640px){
  .tl-svg{ display:none; }
}

/* ---------- resume lines ---------- */
.rline{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  border-bottom:1px solid var(--border);
  padding:1rem 0;
  text-align:left;
}
.rline:last-child{ border-bottom:none; }
.rline .role{ font-weight:700; color:var(--ink); }
.rline .org{ color:var(--ink-dim); font-size:.92rem; }
.rline .when{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.7rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--accent);
  white-space:nowrap;
}

/* ---------- contact ---------- */
.mailto-block{
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:var(--radius-lg);
  padding:2.4rem;
  margin-top:1.8rem;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.mailto-block .eyebrow{
  margin-bottom:1.2rem;
}
.mailto-block .addr{
  font-family:var(--f-display);
  font-weight:600;
  font-style:italic;
  font-size:clamp(1.6rem, 4vw, 2.4rem);
  background:linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* ---------- footer ---------- */
footer{
  padding:2.4rem 1.4rem 1.6rem;
  font-family:var(--f-body);
  font-weight:600;
  font-size:.75rem;
  color:var(--ink-dim);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.55rem;
}
footer a{ color:var(--accent); transition:opacity .18s ease; }
footer a:hover{ opacity:.8; }
.footer-contact{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.45rem;
}
.footer-social{
  display:flex;
  align-items:center;
  gap:.55rem;
  flex-wrap:wrap;
  justify-content:center;
}
.footer-sep{ color:var(--border); user-select:none; }
.footer-hint{
  margin-top:.35rem;
  font-size:.68rem;
  color:var(--ink-dim);
  opacity:.75;
}
.footer-hint kbd{
  font-family:var(--f-mono);
  font-size:.62rem;
  padding:.12rem .4rem;
  border-radius:4px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--ink);
}

/* ---------- credibility strip ---------- */
.cred-strip{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.5rem;
  margin-top:1.5rem;
  padding:0;
  list-style:none;
}
.cred-strip li{
  font-family:var(--f-body);
  font-weight:600;
  font-size:.72rem;
  letter-spacing:.02em;
  color:var(--ink-dim);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:999px;
  padding:.38rem .9rem;
}

/* ---------- featured terminal mock ---------- */
.featured-proj{ text-align:center; }
.featured-proj .featured-head{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.6rem;
  margin-bottom:1.4rem;
}
.featured-proj .featured-head h2{ margin-bottom:0; }
.term-mock{
  text-align:left;
  padding:0;
  overflow:hidden;
}
.term-mock .term-bar{
  display:flex;
  align-items:center;
  gap:.45rem;
  padding:.65rem 1rem;
  background:var(--panel-2);
  border-bottom:1px solid var(--border);
}
.term-mock .term-dot{
  width:8px; height:8px;
  border-radius:50%;
  background:var(--border);
}
.term-mock .term-dot:nth-child(1){ background:#ff5f57; }
.term-mock .term-dot:nth-child(2){ background:#febc2e; }
.term-mock .term-dot:nth-child(3){ background:#28c840; }
.term-mock .term-title{
  margin-left:.4rem;
  font-family:var(--f-mono);
  font-size:.68rem;
  color:var(--ink-dim);
}
.term-mock .term-body{
  padding:1.4rem 1.5rem 1.6rem;
  font-family:var(--f-mono);
  font-size:.78rem;
  line-height:1.65;
  color:var(--ink);
}
.term-mock .term-cmd{ margin-bottom:.9rem; color:var(--ink); }
.term-mock .term-prompt{ color:var(--accent); margin-right:.35rem; }
.term-mock .term-row{
  display:flex;
  align-items:baseline;
  gap:.35rem;
  flex-wrap:wrap;
  color:var(--ink-dim);
}
.term-mock .term-check{ color:var(--accent); flex-shrink:0; }
.term-mock .term-label{ flex-shrink:0; }
.term-mock .term-dots{
  flex:1 1 auto;
  min-width:1rem;
  overflow:hidden;
  white-space:nowrap;
  letter-spacing:.08em;
  opacity:.45;
}
.term-mock .term-status{ flex-shrink:0; font-weight:500; }
.term-mock .term-status.ok{ color:var(--accent); }
.term-mock .term-status.flag{ color:#ffb020; }
.term-mock .term-foot{
  margin-top:1rem;
  padding-top:.9rem;
  border-top:1px dashed var(--border);
  color:var(--ink-dim);
  font-size:.72rem;
}
.featured-proj .btn-row{ margin-top:1.6rem; }

/* ---------- copy email button ---------- */
.addr-row{
  display:flex;
  align-items:center;
  gap:.65rem;
  flex-wrap:wrap;
  justify-content:center;
}
.copy-btn{
  width:2.35rem;
  height:2.35rem;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--panel-2);
  color:var(--ink);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  cursor:pointer;
  flex-shrink:0;
  padding:0;
  font-family:var(--f-body);
  font-weight:700;
  font-size:.72rem;
  letter-spacing:.02em;
  transition:background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, width .18s ease, padding .18s ease;
}
.copy-btn svg{ width:1rem; height:1rem; flex-shrink:0; }
.copy-btn .copy-label{ display:none; white-space:nowrap; }
.copy-btn:hover{
  background:var(--accent);
  color:var(--on-accent);
  border-color:var(--accent);
  transform:translateY(-1px);
}
.copy-btn.copied{
  width:auto;
  height:2.35rem;
  padding:0 .95rem;
  background:var(--accent);
  color:var(--on-accent);
  border-color:var(--accent);
  transform:translateY(0);
}
.copy-btn.copied .copy-icon{ display:none; }
.copy-btn.copied .copy-label{ display:inline; }
.copy-btn.copied:hover{
  background:var(--accent);
  color:var(--on-accent);
  transform:translateY(0);
}

/* ---------- command palette ---------- */
.cmd-palette{
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:12vh 1rem 1rem;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}
.cmd-palette.open{
  opacity:1;
  pointer-events:auto;
}
.cmd-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}
[data-theme="light"] .cmd-backdrop{ background:rgba(17,17,17,.35); }
.cmd-dialog{
  position:relative;
  width:100%;
  max-width:420px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow);
  overflow:hidden;
  transform:translateY(-8px) scale(.98);
  transition:transform .2s ease;
}
.cmd-palette.open .cmd-dialog{
  transform:translateY(0) scale(1);
}
.cmd-input-wrap{
  display:flex;
  align-items:center;
  gap:.5rem;
  padding:.85rem 1rem;
  border-bottom:1px solid var(--border);
}
.cmd-input-wrap .cmd-glyph{
  font-family:var(--f-mono);
  font-size:.85rem;
  color:var(--accent);
  flex-shrink:0;
}
.cmd-input{
  flex:1;
  border:0;
  background:transparent;
  font-family:var(--f-body);
  font-size:.92rem;
  font-weight:600;
  color:var(--ink);
  outline:none;
}
.cmd-input::placeholder{ color:var(--ink-dim); font-weight:500; }
.cmd-list{
  list-style:none;
  max-height:280px;
  overflow-y:auto;
  padding:.35rem;
}
.cmd-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.65rem .85rem;
  border-radius:10px;
  cursor:pointer;
  font-family:var(--f-body);
  font-weight:600;
  font-size:.86rem;
  color:var(--ink);
  transition:background .12s ease;
}
.cmd-item:hover,
.cmd-item.active{
  background:var(--panel-2);
}
.cmd-item .cmd-keys{
  font-family:var(--f-mono);
  font-size:.62rem;
  color:var(--ink-dim);
  letter-spacing:.04em;
  text-transform:uppercase;
  flex-shrink:0;
}
.cmd-hint{
  padding:.55rem 1rem .75rem;
  font-family:var(--f-body);
  font-size:.68rem;
  color:var(--ink-dim);
  border-top:1px solid var(--border);
  text-align:center;
}

/* ---------- 404 page ---------- */
.error-page .error-art{
  display:flex;
  justify-content:center;
  margin:1.6rem 0 2rem;
}
.dead-pc{
  width:min(180px, 45vw);
  height:auto;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
}
.error-panel{
  text-align:left;
  margin-top:1.8rem;
}
.error-panel .term-body{ font-family:var(--f-mono); font-size:.82rem; line-height:1.7; }
.error-panel .err{ color:#ff6b6b; }
.error-panel .hint{ color:var(--ink-dim); margin-top:.8rem; }

/* ---------- project deep-link highlight ---------- */
.proj.proj-target{
  border-color:var(--accent);
  box-shadow:var(--shadow);
}

/* ---------- project pill / accordion ---------- */
.proj{
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:28px;
  padding:1.5rem 1.7rem;
  margin-bottom:1rem;
  text-align:left;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.proj:hover{ border-color:var(--accent); box-shadow:var(--shadow); }
.proj summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  gap:.9rem;
  flex-wrap:wrap;
}
.proj summary::-webkit-details-marker{ display:none; }
.proj-num{
  font-family:var(--f-body);
  font-weight:800;
  font-size:.72rem;
  color:var(--on-accent);
  background:var(--accent);
  border-radius:999px;
  width:2rem; height:2rem;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.proj-title{
  font-family:var(--f-display);
  font-weight:600;
  font-size:1.2rem;
  color:var(--ink);
  flex:1 1 auto;
  min-width:160px;
}
.proj-toggle{
  font-family:var(--f-body);
  font-weight:700;
  font-size:.72rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--ink);
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:999px;
  padding:.4rem .9rem;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  flex-shrink:0;
  transition:background .18s ease, color .18s ease;
}
.proj:hover .proj-toggle{ background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.proj-toggle .chevron{ transition:transform .25s ease; display:inline-block; }
.proj[open] .proj-toggle .chevron{ transform:rotate(180deg); }
.proj[open] .proj-toggle .show-more{ display:none; }
.proj:not([open]) .proj-toggle .show-less{ display:none; }
.proj-desc{
  color:var(--ink-dim);
  font-size:.94rem;
  margin-top:.6rem;
  margin-left:2.9rem;
  max-width:56ch;
}
.proj-body{
  margin-top:1.1rem;
  padding-top:1.1rem;
  margin-left:2.9rem;
  border-top:1px dashed var(--border);
  animation:riseIn .35s ease both;
}
.proj-body p{ margin-left:0; max-width:60ch; color:var(--ink-dim); }
.proj[id]{ scroll-margin-top:6.5rem; }

/* ---------- back to top ---------- */
.to-top{
  position:fixed;
  right:1.3rem;
  bottom:1.3rem;
  width:2.9rem;
  height:2.9rem;
  border-radius:50%;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--ink);
  box-shadow:var(--shadow);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:80;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.to-top svg{ width:1.1rem; height:1.1rem; }
.to-top.show{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}
.to-top:hover{
  background:var(--accent);
  color:var(--on-accent);
  border-color:var(--accent);
}

/* ---------- footer CTA band ---------- */
.cta-band{
  margin:5rem auto 0;
  padding:3rem 2rem;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
}
.cta-band .cta-tag{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-family:var(--f-body);
  font-weight:700;
  font-size:.78rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:1rem;
}
.cta-band .cta-tag .ring{
  width:9px; height:9px;
  border-radius:50%;
  border:2px solid var(--accent);
}
.cta-band h2{ margin-bottom:1.6rem; }
.cta-band .btn{ font-size:.95rem; padding:1rem 2rem; }
@media (min-width: 1100px){
  :root{ --maxw: 900px; }
  html{ font-size:18px; }
}
@media (min-width: 1500px){
  :root{ --maxw: 1040px; }
  html{ font-size:19px; }
}
@media (max-width: 720px){
  .pillnav{ flex-wrap:wrap; justify-content:center; padding:.6rem 1rem; }
  .nav-toggle{
    display:block;
    order:1;
    background:var(--panel-2);
    border:1px solid var(--border);
    color:var(--ink);
    border-radius:999px;
    padding:.4rem .8rem;
    font-family:var(--f-body);
    font-weight:700;
    font-size:.72rem;
  }
  .nav-links{
    display:none;
    width:100%;
    flex-direction:column;
    order:3;
    margin-top:.6rem;
  }
  .nav-links.open{ display:flex; }
  .nav-links a{ text-align:center; }
  .grid.cols-2{ grid-template-columns:1fr; }
  .entry-head{ flex-direction:column; }
  .cred-strip li{ font-size:.68rem; padding:.32rem .75rem; }
  .term-mock .term-body{ font-size:.72rem; padding:1.1rem 1rem 1.3rem; }
  .cmd-palette{ padding-top:8vh; }
  html{ scroll-padding-top:9rem; }
  .proj[id]{ scroll-margin-top:9rem; }
}
