:root{
  --ink:#2b2b2b;
  --body:#666666;
  --muted:#8f8f8f;
  --line:#d4d4d4;
  --mono: 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html{
  background-color: #ffffff;
  background-image: linear-gradient(to bottom, #b9b8b8 0%, #f0f0f0 50%, #ffffff 100%);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
  background-position: top;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body{
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.wrap{ max-width:1140px; margin:0 auto; padding:0 24px; }

/* ---------- header / nav ---------- */
header.wrap{ padding:10px 24px 0; }
.nav{ display:flex; justify-content:space-between; align-items:baseline; font-size:14px; }
.nav .name{
  font-size:23px;
  font-weight:bold;
  margin-right:auto;
  margin-left:-25px;
  letter-spacing:1px;
}
.nav ul{ list-style:none; display:flex; gap:24px; }
.nav a{ color: var(--ink); }
.nav a:hover{ color: var(--ink); text-decoration:underline; }
.nav a.current{ color: var(--ink); text-decoration:underline; }

@media (max-width:640px){
  .nav{ flex-direction:column; align-items:flex-start; gap:8px; }
  .nav .name{ margin-left:0; margin-right:0; font-size:16px; letter-spacing:0.5px; white-space:nowrap; }
  .nav ul{ gap:16px; flex-wrap:wrap; }
}

/* ---------- headings ---------- */
h1{ font-size:18px; font-weight:normal; line-height:1.5; max-width:600px; margin-bottom:16px; }
h2{
  font-size:20px;
  font-weight:bold;
  letter-spacing:0.3px;
  margin-bottom:16px;
}
h3, .about h3{
  font-size:14px;
  font-weight:bold;
  text-transform:uppercase;
  letter-spacing:1px;
  margin-bottom:16px;
  color:#333333;
}

/* ---------- hero / page title ---------- */
.hero{
  padding-top:20px;
  padding-bottom:34px;
}

.hero .role{
  color:#6b6b6b;
  font-size:12px;
  margin-bottom:10px;
  text-transform:uppercase;
  letter-spacing:1px;
}

.hero p{
  color:#6b6b6b;
  margin-bottom:50px;
  max-width:820px;
}

.hero h1{
  font-size:15px;
  font-weight:normal;
  line-height:1.5;
  max-width:600px;
  margin-bottom:16px;
}

.hero .hello{
  display:block;
  font-family:var(--mono);
  color:var(--ink);
  font-size:15px;
  margin-bottom:7px;
}

.page-title{ padding-top:20px; padding-bottom:40px; }
.page-title--tight{ padding-bottom:18px; }
.section-divider.section-divider--tight{ margin:0 0 38px; border-top-color:#a8a8a8; }
.page-title h1{ font-size:20px; letter-spacing:0.3px; font-weight:bold; margin-bottom:16px; }
.page-title p{ color:var(--body); max-width:760px; }
.page-title .intro-lead{ color:var(--ink); font-size:15px; font-weight:normal; line-height:1.5; max-width:600px; }
.about-contact{ font-size:13px; color:var(--muted); margin-top:22px; }
.about-contact a{ color:var(--ink); text-decoration:underline; }
.project-subtitle{ color:var(--ink) !important; font-size:15px; font-weight:600; margin-top:8px; max-width:860px; }

/* ---------- sections / projects ---------- */
.section{ padding-bottom:48px; }

#grid{ display:flex; flex-direction:column; }
.filters{ margin-bottom:40px; font-size:14px; color:var(--muted); }
.filters span{ cursor:pointer; margin-right:16px; }
.filters span:hover{ color:var(--ink); }
.filters span.active{ color:var(--ink); text-decoration:underline; }

.project{ display:block; padding:18px 0; border-bottom:1px solid var(--line); text-decoration:none; color:inherit; }
.project.is-hidden{ display:none; }
.project.last-visible{ border-bottom:none; }
.project:hover .project-name{ text-decoration:underline; }
.project-top{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px; }
.project-name{ font-weight:bold; font-size:15px; max-width:70%; }
.project-desc{ color:#666666; font-size:14px; margin-bottom:6px; }
.card-subtitle{ font-weight:600; color:var(--body); font-size:13.5px; margin-bottom:6px; }
.project-taxonomy{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:1.5px; margin-bottom:6px; }
.taxonomy{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:1.5px; margin-top:8px; margin-bottom:0; }
.project-img{ display:block; width:100%; max-width:480px; border-radius:6px; margin:10px 0; }
.project-links{ font-size:13px; margin:2px 0 8px; color:var(--muted); }
.project-links a{ color:var(--ink); text-decoration:underline; }
.project-links--credit{ margin-top:16px; }

/* ---------- individual project page ---------- */
.back-link{ font-size:13px; margin-bottom:10px; }
.back-link a{ color:var(--ink); text-decoration:underline; }
.project-page .project-img{ max-width:700px; }
.project-page .project-img--sm{ max-width:380px; }
.project-page .project-img-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:10px 0; }
.project-page .project-img-row .project-img{ margin:0; width:100%; max-width:100%; height:auto; }
@media (max-width:600px){ .project-page .project-img-row{ grid-template-columns:1fr; } }
.project-page .project-desc{ font-size:14px; max-width:640px; margin-bottom:14px; }
.project-page figure{ margin:18px 0; max-width:700px; }
.project-page figcaption{ font-size:12.5px; color:var(--muted); margin-top:6px; line-height:1.45; max-width:640px; }
.project-page .pipeline-label + .taxonomy{ margin-top:0; margin-bottom:16px; }
.project-page .fig-spaced{ margin:38px 0; }

.feature-list{ list-style:none; margin:0 0 16px; padding:0; max-width:640px; }
.feature-list li{ position:relative; padding-left:14px; font-size:14px; color:#666666; line-height:1.5; margin-bottom:7px; }
.feature-list li::before{ content:"\2022"; position:absolute; left:0; color:var(--muted); }

/* ---------- research ---------- */
.research-intro{ color:var(--body); max-width:880px; margin-bottom:28px; }
.research-list-item{ display:block; padding:18px 0; border-bottom:1px solid var(--line); text-decoration:none; color:inherit; }
.research-list-item:last-child{ border-bottom:none; }
.research-list-item:hover .research-list-title{ text-decoration:underline; }
.research-list-title{ font-weight:bold; font-size:15px; margin-bottom:6px; }
.research-list-subtitle{ font-weight:600; color:var(--body); font-size:13.5px; margin-bottom:6px; }
.research-list-meta{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:1.5px; margin-bottom:6px; }
.research-list-desc{ color:#666666; font-size:14px; margin-bottom:6px; }
.research-list-explore{ font-size:13px; color:var(--ink); text-decoration:underline; }

.research-item{ margin-bottom:22px; }
.research-item h3{ font-size:19px; letter-spacing:0.5px; margin-bottom:8px; }
.research-item p{ color:var(--body); font-size:14px; }
.research-item a{ color: var(--ink); font-size:14px; text-decoration:underline; }

.research-item figure{ margin:40px 0; }
.research-item figure img{ display:block; width:100%; border:1px solid #ececec; border-radius:4px; }
.research-item figcaption{ font-size:12px; color:var(--muted); margin-top:6px; line-height:1.45; max-width:640px; }
.research-item .fig-knn{ max-width:380px; }
.research-item .fig-map{ max-width:720px; }
.research-item .fig-bars{ max-width:640px; }
.research-item .fig-class{ max-width:460px; }

.research-item .fig-hero{ max-width:none; margin:6px 0 26px; }
.research-item .fig-hero img{ border:none; border-radius:6px; }
.research-item .fig-hero figcaption{ max-width:640px; }

.fig-trio{ display:flex; gap:20px; flex-wrap:wrap; align-items:flex-end; margin:40px 0; }
.fig-trio figure{ margin:0; flex:0 1 320px; }
.fig-trio img{ width:100%; height:auto; display:block; border:1px solid #ececec; border-radius:4px; background:#fff; }
.fig-trio figcaption{ font-size:11.5px; color:var(--muted); margin-top:7px; text-align:center; }
.fig-trio-caption{ font-size:12px; color:var(--muted); margin-top:10px; line-height:1.45; max-width:760px; }

.fig-pair{ display:flex; gap:20px; flex-wrap:wrap; margin:40px 0; max-width:760px; }
.fig-pair figure{ margin:0; flex:1 1 260px; }
.fig-pair img{ width:100%; height:240px; object-fit:contain; background:#fff; display:block; border:1px solid #ececec; border-radius:4px; }
.fig-pair figcaption{ font-size:12px; color:var(--muted); margin-top:6px; line-height:1.4; }

.research-item .fig-large{ max-width:none; }
.research-item .fig-large img{ border-radius:6px; }

.research-item .fig-compact{ max-width:400px; margin:40px 0; }
.research-item .fig-compact-lg{ max-width:1090px; margin:40px 0; }
.research-item .fig-compact-lg figure{ max-width:none; }

#geometric-compliance-engine .fig-compact-lg{ max-width:920px; }

.research-item .fig-pair-match{ max-width:370px; }
.research-item .fig-pair-match img{ height:240px; object-fit:contain; background:#fff; }

.urban-subsection{ margin-top:32px; }
.urban-subsection .fig-kicker{ font-size:10px; letter-spacing:1px; opacity:0.8; margin-bottom:8px; padding-bottom:6px; border-bottom:1px solid var(--line); }

/* ---------- technical figure blocks (research write-up) ---------- */
.fig-block{ margin-top:30px; padding-top:22px; }
.fig-block:first-of-type{ margin-top:24px; }
.fig-kicker{ font-size:11.5px; color:var(--ink); font-weight:700; text-transform:uppercase; letter-spacing:1.5px; margin-bottom:6px; }
.fig-title{ font-size:14px; font-weight:bold; color:var(--ink); margin-bottom:4px; text-transform:none; letter-spacing:0; }
.fig-question{ font-size:14px; color:var(--body); font-style:italic; margin-bottom:12px; }
.fig-block p{ color:var(--body); font-size:14px; margin-bottom:10px; max-width:680px; }
.fig-block p strong{ color:var(--body); }

.thesis-title{ font-style:normal; font-weight:normal; color:var(--body) !important; font-size:14.5px; letter-spacing:0.2px; margin-bottom:18px !important; }

.stat-row{ display:flex; flex-wrap:wrap; gap:10px 22px; margin:14px 0; font-size:13.5px; }
.stat-row .stat{ color:var(--ink); }
.stat-row .stat b{ font-weight:bold; }
.stat-row .stat small{ color:var(--muted); }

.pipeline{ font-family:var(--mono); font-size:12px; color:var(--ink); background:#f4f4f4;
  border:1px solid var(--line); border-radius:4px; padding:10px 14px; margin:14px 0;
  display:inline-block; letter-spacing:0.2px; }
.pipeline .arrow{ color:var(--muted); margin:0 4px; }
.pipeline.vertical{ display:block; max-width:340px; line-height:1.9; text-align:center; }
.pipeline-label{ font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; margin:18px 0 2px; }

.pipeline.large{ display:block; font-size:15px; font-weight:bold; padding:20px 24px; text-align:center;
  letter-spacing:0.3px; max-width:640px; margin:18px auto 0; }
.pipeline-features{ font-family:var(--mono); font-size:12px; color:var(--muted); text-align:center;
  margin:10px auto 0; max-width:640px; letter-spacing:0.2px; }

/* ---------- technical panel: ruled spec-sheet, no box ---------- */
/* monospace is an accent (labels, params, numbers) — the paragraph itself stays normal prose, just slightly smaller */
.tech-panel{ border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  padding:16px 0; margin:18px 0; max-width:460px; }
.tech-panel-label{ font-size:10.5px; color:var(--muted); text-transform:uppercase;
  letter-spacing:1.5px; margin-bottom:10px; }
.tech-text{ font-size:13px; color:var(--body); line-height:1.6; margin-bottom:14px; max-width:420px; }
.tech-group + .tech-group{ margin-top:8px; }
.tech-row{ display:flex; justify-content:space-between; gap:16px; padding:2px 0; font-size:11.5px; letter-spacing:0.2px; color:var(--muted); }
.tech-row .tech-key{ color:var(--muted); text-transform:uppercase; letter-spacing:0.6px; }

.graph-row{ display:flex; gap:16px; flex-wrap:wrap; margin:18px 0; }
.graph-placeholder{ flex:1 1 220px; border:1px dashed var(--line); border-radius:4px; padding:44px 16px;
  text-align:center; font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; }

.result-stats{ display:flex; gap:26px; margin:16px 0; }
.result-stats .result-value{ font-size:18px; font-weight:bold; color:var(--ink); letter-spacing:0.2px; }

.flow-diagram{ display:flex; align-items:stretch; gap:0; margin:20px 0 8px; overflow-x:auto; padding-bottom:14px;
  scrollbar-width:thin; scrollbar-color:var(--muted) #eeeeee; }
.flow-diagram::-webkit-scrollbar{ height:8px; }
.flow-diagram::-webkit-scrollbar-track{ background:#eeeeee; border-radius:4px; }
.flow-diagram::-webkit-scrollbar-thumb{ background:var(--muted); border-radius:4px; }
.flow-diagram::-webkit-scrollbar-thumb:hover{ background:var(--ink); }
.flow-step{ flex:0 0 148px; border:1px solid var(--line); border-radius:4px; padding:12px 14px; background:#fafafa; }
.flow-step-final{ background:#f2f2f2; }
.flow-step-title{ font-size:10.5px; font-weight:bold; color:var(--ink); text-transform:uppercase;
  letter-spacing:0.8px; margin-bottom:8px; padding-bottom:7px; border-bottom:1px solid var(--line); }
.flow-step-list{ list-style:none; margin:0; padding:0; font-size:11.5px; color:var(--muted); line-height:1.7; }
.flow-arrow{ flex:0 0 26px; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:14px; }

.data-table{ width:100%; max-width:420px; border-collapse:collapse; font-size:13.5px; margin:14px 0; }
.data-table th, .data-table td{ text-align:left; padding:7px 16px 7px 0; border-bottom:1px solid var(--line); }
.data-table th{ color:var(--muted); font-weight:normal; text-transform:uppercase; letter-spacing:0.5px; font-size:11px; }
.data-table td{ color:var(--ink); }

.takeaway{ border-left:2px solid var(--ink); padding:4px 0 4px 14px; margin:14px 0; font-size:13.5px; color:var(--ink); max-width:640px; }
.takeaway .label{ display:block; font-weight:bold; font-size:11.5px; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:4px; }

.synthesis{ margin-top:56px; padding-top:32px; }
.predict-line{ font-family:var(--mono); font-weight:bold; color:var(--ink) !important; font-size:14.5px; margin:16px 0 !important; }

.closing-line{ font-family:var(--mono); font-weight:bold; font-size:17px; letter-spacing:0.5px; color:var(--ink) !important; margin:22px 0 0 !important; }
.fig-block.synthesis + .project-links{ margin-top:36px; }

/* ---------- practice ---------- */
.practice-row{ margin-bottom:18px; }
.practice-row:last-child{ margin-bottom:0; }
.practice-role{ font-weight:normal; font-size:14px; color:#828282; margin-bottom:4px; }
.practice-date{ font-size:11.5px; color:#b0b0b0; text-transform:uppercase; letter-spacing:1px; margin-bottom:4px; }
.practice-desc{ color:#9a9a9a; font-size:13px; line-height:1.55; max-width:640px; margin-bottom:4px; }

/* ---------- about ---------- */
.about p{ margin-bottom:12px; max-width:760px; color:var(--body); }
.about h3{ margin-top:24px; margin-bottom:12px; }
.edu{ margin-top:0; font-size:14px; color:#828282; }
.edu div{ margin-bottom:4px; }

.cv-actions{ margin-top:44px; margin-bottom:32px; }
.section-divider{ border:none; border-top:1px solid var(--line); margin:0 0 28px; }
.cv-download{
  display:inline-block;
  border:1px solid #828282;
  color:#828282;
  padding:10px 18px;
  font-size:14px;
}
.cv-download:hover{ background:#828282; color:#ffffff; }

/* ---------- geometric compliance engine: bridge / compare diagrams ---------- */
.bridge-diagram{ margin:20px 0 10px; max-width:660px; }
.bridge-tier{ border:1px solid var(--line); border-radius:4px; padding:14px 18px; background:#fafafa; }
.bridge-tier--ifc{ background:#f0f0f0; }
.bridge-tier-label{ font-size:10.5px; font-weight:bold; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:8px; }
.bridge-tier-items{ font-size:12.5px; color:var(--ink); line-height:1.7; }
.bridge-arrow{ text-align:center; color:var(--muted); font-size:15px; padding:8px 0; }

.compare-grid{ display:flex; gap:16px; flex-wrap:wrap; margin:14px 0 22px; }
.compare-card{ flex:1 1 220px; border:1px solid var(--line); border-radius:4px; padding:14px 16px; background:#fafafa; }
.compare-label{ display:block; font-size:10.5px; font-weight:bold; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:8px; }
.compare-card code{ display:block; margin-top:2px; }
.compare-card p{ margin-bottom:0 !important; }

.research-item .fig-shot{ max-width:720px; margin:28px 0; }

/* ---------- footer ---------- */
footer{
  padding:28px 0;
  font-size:13px;
  color:var(--muted);
  border-top:1px solid var(--line);
  margin-top:24px;
}

/* ---------- smaller type on phones only ---------- */
@media (max-width:640px){
  body{ font-size:13.5px; }
  h1{ font-size:16px; }
  h2{ font-size:18px; }
  .hero h1{ font-size:14px; }
  .page-title h1{ font-size:18px; }
  .project-name{ font-size:14px; }
  .research-item h3{ font-size:17px; }
  .closing-line{ font-size:15px; }
  .pipeline.large{ font-size:14px; }
}