/* ─────────────────────────────────────────────────────────────
   TOKENS — light (engineer's computation pad on a desk)
   ───────────────────────────────────────────────────────────── */
:root{
  --desk:        #D6DBCB;
  --desk-edge:   #C4CAB6;
  --sheet:       #EAEEE3;
  --sheet-2:     #E2E7D9;
  --grid:        rgba(104,128,88,.20);
  --grid-major:  rgba(104,128,88,.34);
  --ink:         #21261D;
  --ink-soft:    #59614F;
  --ink-faint:   #8A917C;
  --stroke:      rgba(33,38,29,.80);
  --stroke-soft: rgba(33,38,29,.34);
  --sheet-shadow: 0 1px 2px rgba(40,50,30,.10), 0 12px 28px -14px rgba(40,50,30,.34);

  --measure: 61ch;
  --sheet-w: 780px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  background:var(--desk);
  background-image:
    radial-gradient(120% 80% at 50% -10%, var(--desk-edge) 0%, transparent 60%);
  color:var(--ink);
  font-family:"Newsreader",Georgia,"Times New Roman",serif;
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  padding:clamp(14px,3.4vw,44px) clamp(10px,3vw,28px) 70px;
  min-height:100vh;
}

/* ── utility layer ─────────────────────────────────────────── */
.label{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10.5px; font-weight:600; letter-spacing:.16em; text-transform:uppercase;
  color:var(--ink-faint);
}

/* ── the shell ─────────────────────────────────────────────── */
.pad{ max-width:var(--sheet-w); margin:0 auto; }

.desk-bar{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:16px; margin-bottom:12px; padding:0 4px;
}
.desk-bar .label{ color:var(--ink-soft); opacity:.75; }

/* ── folder tabs ───────────────────────────────────────────── */
.tabs{
  display:flex; align-items:flex-end; gap:5px;
  padding-left:clamp(12px,3vw,30px);
  overflow-x:auto; overflow-y:hidden;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{ display:none; }

.tab{
  position:relative;
  flex:0 0 auto;
  background:var(--sheet-2);
  border:0;
  padding:9px 15px;
  margin-bottom:-2px;
  color:var(--ink-soft);
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10.5px; font-weight:600; letter-spacing:.15em; text-transform:uppercase;
  cursor:pointer;
  clip-path:polygon(7px 0, calc(100% - 7px) 0, 100% 100%, 0 100%);
  transition:color .16s ease, background .16s ease;
}
.tab:hover{ color:var(--ink); }
.tab:focus-visible{ outline:2px solid var(--ink); outline-offset:-4px; }
.tab[aria-current="page"]{
  background:var(--sheet);
  color:var(--ink);
  padding-bottom:13px;
  margin-bottom:-6px;
  z-index:3;
}

/* ── the sheet ─────────────────────────────────────────────── */
.sheet{
  position:relative;
  background:var(--sheet);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size:20px 20px, 20px 20px, 100px 100px, 100px 100px;
  box-shadow:var(--sheet-shadow);
  padding:clamp(26px,5vw,50px) clamp(20px,5vw,54px) clamp(34px,5vw,52px);
  z-index:2;
}
.sheet > .sheet-body{ position:relative; z-index:2; }

.page{ display:none; }
.page.is-on{ display:block; }

.fading .sheet-body{ opacity:0; transform:translateY(5px); }
.sheet-body{ transition:opacity .17s ease, transform .17s ease; }

/* ── type scale ────────────────────────────────────────────── */
.nameplate{
  font-family:"Martian Mono","IBM Plex Mono",ui-monospace,monospace;
  font-weight:700;
  font-size:clamp(19px,4.1vw,31px);
  line-height:1.12; letter-spacing:-.055em; text-transform:uppercase;
  margin:0 0 18px; text-wrap:balance;
}
h2.sheet-title{
  font-family:"Martian Mono","IBM Plex Mono",ui-monospace,monospace;
  font-weight:600;
  font-size:clamp(15px,2.9vw,21px);
  line-height:1.2; letter-spacing:-.05em; text-transform:uppercase;
  margin:0 0 20px; text-wrap:balance;
}
.lede{
  font-size:20px; line-height:1.55; max-width:var(--measure);
  margin:0 0 30px; color:var(--ink);
}
.lede em{ font-style:italic; color:var(--ink-soft); }
p{ max-width:var(--measure); }

/* ── section rules ─────────────────────────────────────────── */
.sec{ margin-top:40px; }
.sec-head{
  position:relative;
  display:flex; align-items:baseline; justify-content:space-between; gap:14px;
  padding-bottom:9px; margin-bottom:20px;
}
.sec-head h3{
  margin:0;
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10.5px; font-weight:600; letter-spacing:.2em; text-transform:uppercase;
  color:var(--ink);
}
.sec-head .more{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink); background:none; border:0; cursor:pointer; padding:0;
}
.sec-head .more:hover{ text-decoration:underline; text-underline-offset:3px; }
.sec-head .more:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }

/* ── contact rail ──────────────────────────────────────────── */
.rail{
  display:flex; gap:18px; flex-wrap:wrap; margin:0 0 28px;
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:11.5px; letter-spacing:.04em;
}
.rail a{
  color:var(--ink); text-decoration:underline;
  text-decoration-thickness:1px; text-underline-offset:3px;
  text-decoration-color:var(--ink-faint);
}
.rail a:hover{ text-decoration-color:var(--ink); }
.rail a:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }

/* ── the "what I'm up to" box ──────────────────────────────── */
.bench{ position:relative; padding:19px 22px 20px; margin:0; max-width:var(--measure); }
.bench > *{ position:relative; }
.bench-top{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:12px; margin-bottom:9px; flex-wrap:wrap;
}
.bench-top .label{
  letter-spacing:.2em;
  /* nudged off the grid line the baseline was landing on — purely
     visual, so the sketched box and the paragraph below don't move */
  position:relative; top:1px;
}
.bench p{ margin:0; font-size:17.5px; }
.bench p + p{ margin-top:9px; }

/* ── experience entries ────────────────────────────────────── */
.role{ margin-bottom:30px; max-width:var(--measure); }
.role:last-child{ margin-bottom:0; }
.role h4{
  margin:0 0 3px;
  font-size:18.5px; font-weight:500; line-height:1.3; color:var(--ink);
}
.role .org{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:11.5px; letter-spacing:.05em; color:var(--ink-soft);
  margin:0 0 1px;
}
.role .org .bar{ color:var(--ink-faint); opacity:.6; padding:0 3px; }
.role .when{
  display:block;
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10.5px; letter-spacing:.09em; color:var(--ink-faint);
  font-variant-numeric:tabular-nums;
  margin-bottom:11px;
}
.role ul{ margin:0; padding-left:16px; list-style:none; }
.role li{
  position:relative;
  margin-bottom:5px; font-size:16.5px; line-height:1.55; color:var(--ink-soft);
}
.role li::before{
  content:"—"; position:absolute; left:-16px; color:var(--ink-faint); opacity:.7;
}

/* ── empty states ──────────────────────────────────────────── */
.empty{
  position:relative;
  max-width:var(--measure);
  padding:44px 26px;
  text-align:center;
}
.empty > *{ position:relative; }
.empty .big{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:11px; font-weight:600; letter-spacing:.2em; text-transform:uppercase;
  color:var(--ink-faint); margin:0 0 10px;
}
.empty p{
  margin:0 auto; max-width:44ch;
  font-size:16.5px; line-height:1.55; color:var(--ink-soft); font-style:italic;
}

/* ── project cards (empty for now; fill the arrays) ────────── */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:26px 22px; }
.thing{ display:flex; flex-direction:column; gap:9px; }
.thing .frame{ position:relative; aspect-ratio:4/3; }
.thing h4{ margin:0; font-size:17px; font-weight:500; line-height:1.3; }
.thing .spec{
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:10px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-faint); display:flex; gap:6px; flex-wrap:wrap;
}
.thing .spec .sep{ opacity:.5; }
.thing p{ margin:0; font-size:15.5px; line-height:1.5; color:var(--ink-soft); }

/* ── sketch overlays ───────────────────────────────────────
   Element+class specificity so a later `.parent > *` rule can
   never knock these out of absolute positioning. */
svg.sheet-sk, svg.bench-sk, svg.rule-sk, svg.empty-sk, .frame > svg{
  position:absolute; inset:0; width:100%; height:100%;
  display:block; overflow:visible; pointer-events:none;
}
svg.sheet-sk{ z-index:1; }
.sec-head svg.rule-sk{ inset:auto 0 0 0; height:8px; }

@media (max-width:560px){
  body{ font-size:16px; }
  .sheet{ padding-left:18px; padding-right:18px; }
}

@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; animation:none !important; }
}
