/*
 * Koen Reinders — Portfolio styles
 * Edit colors in :root. The moving network is configured in script.js.
 */

@font-face {
  font-family:'DM Sans';
  src:url('assets/fonts/dm-sans-variable.woff2') format('woff2');
  font-style:normal;
  font-weight:100 1000;
  font-display:swap
}
@font-face {
  font-family:'Manrope';
  src:url('assets/fonts/manrope-variable.woff2') format('woff2');
  font-style:normal;
  font-weight:200 800;
  font-display:swap
}

/* 01 — Design tokens and global defaults */
:root {
  --bg:#080d10;
  --bg2:#0e1518;
  --text:#e9eeeb;
  --muted:#879394;
  --line:#253135;
  --accent:#9cdec9;
  --warm:#d89b73
}
* {
  box-sizing:border-box
}
html {
  scroll-behavior:smooth;
  scroll-padding-top:110px
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'DM Sans',sans-serif;
  font-weight:300;
  -webkit-font-smoothing:antialiased
}
a {
  color:inherit;
  text-decoration:none
}
button,a {
  -webkit-tap-highlight-color:transparent
}
::selection {
  background:var(--accent);
  color:var(--bg)
}
.skip-link {
  position:fixed;
  top:12px;
  left:12px;
  z-index:100;
  padding:11px 16px;
  border-radius:8px;
  background:var(--accent);
  color:var(--bg);
  font-size:13px;
  font-weight:600;
  transform:translateY(-150%);
  transition:transform .2s
}
.skip-link:focus {
  transform:translateY(0)
}
.container {
  width:min(1240px,calc(100% - 112px));
  margin-inline:auto
}
.grain {
  pointer-events:none;
  position:fixed;
  inset:0;
  z-index:20;
  opacity:.025;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E")
}

/* 02 — Navigation */
.site-header {
  height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:40;
  width:100%;
  margin:0;
  padding-inline:max(56px,calc((100% - 1240px)/2));
  box-sizing:border-box;
  border-bottom:1px solid #ffffff12;
  background:rgba(8,13,16,.78);
  box-shadow:0 10px 35px rgba(0,0,0,.14);
  backdrop-filter:blur(16px) saturate(125%);
  -webkit-backdrop-filter:blur(16px) saturate(125%)
}
.monogram {
  font-size:20px;
  letter-spacing:.12em;
  font-weight:500
}
.mark,.period {
  color:var(--accent)
}
nav {
  display:flex;
  gap:38px
}
nav a,.header-contact {
  font-size:12px;
  color:#a9b5b4;
  transition:color .2s
}
nav a:hover,.header-contact:hover,.text-link:hover {
  color:var(--accent)
}
.header-contact span {
  color:var(--accent);
  margin-left:8px
}

/* 03 — Hero and animated background */
.hero {
  min-height:790px;
  height:min(920px,100svh);
  position:relative;
  overflow:hidden;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center
}
#network {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:1
}
.hero-shade {
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,#080d10 0%,#080d10ef 28%,#080d1099 53%,#080d1030 100%),linear-gradient(0deg,#080d10 0%,transparent 28%)
}
.hero-content {
  position:relative;
  z-index:2;
  padding-top:65px
}
.eyebrow,.section-number,.feature-index,.visual-caption,.research-year,.cv-panel-top,.footer,.hero-bottom {
  font-size:10px;
  letter-spacing:.19em;
  font-weight:500
}
.eyebrow {
  color:#a9b8b5;
  display:flex;
  align-items:center;
  gap:12px
}
.slash {
  color:#4d5e5d
}
.pulse {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 15px var(--accent);
  animation:pulse 3s infinite
}
@keyframes pulse {
  50% {
    opacity:.3;
    box-shadow:0 0 4px var(--accent)
  }
}
h1,h2,h3,p {
  margin-top:0
}
h1,h2,h3 {
  font-family:Manrope,sans-serif;
  font-weight:300
}
h1 {
  font-size:clamp(65px,7.4vw,116px);
  letter-spacing:-.075em;
  line-height:1.11;
  margin:26px 0 30px
}
h1 em,h2 em {
  font-style:normal;
  color:var(--accent)
}
.hero-intro {
  max-width:430px;
  font-size:17px;
  line-height:1.8;
  color:#a9b5b4
}
.actions {
  display:flex;
  align-items:center;
  gap:30px;
  margin-top:34px
}
.button {
  display:inline-flex;
  justify-content:space-between;
  align-items:center;
  gap:38px;
  padding:17px 24px;
  border-radius:100px;
  font-size:12px;
  font-weight:500;
  transition:transform .25s,background .25s
}
.button:hover {
  transform:translateY(-3px);
  background:#c3f2e2
}
.primary {
  background:var(--accent);
  color:#10221d
}
.text-link {
  font-size:12px;
  border-bottom:1px solid #607370;
  padding-bottom:8px;
  transition:color .2s
}
.text-link span {
  margin-left:14px
}
.hero-bottom {
  position:absolute;
  bottom:33px;
  left:0;
  right:0;
  display:flex;
  justify-content:space-between;
  color:#708280;
  z-index:2
}
.hero-bottom a span {
  margin-left:15px;
  color:var(--accent)
}

/* 04 — Project showcases */
.section {
  padding-top:120px;
  padding-bottom:100px
}
.section-heading {
  display:grid;
  grid-template-columns:1fr 1.15fr;
  column-gap:40px;
  align-items:end;
  margin-bottom:60px
}
.section-heading .section-number {
  grid-column:1/-1;
  margin-bottom:24px
}
.section-number {
  color:var(--accent)
}
.section-heading h2,.research-content h2,.about-section h2,.cv-section h2,.contact h2 {
  font-size:clamp(48px,5.6vw,83px);
  line-height:1.13;
  letter-spacing:-.065em;
  margin:0
}
.section-heading p {
  max-width:440px;
  justify-self:end;
  font-size:15px;
  color:var(--muted);
  line-height:1.85;
  margin:0
}
.feature {
  display:grid;
  grid-template-columns:1.18fr 1fr;
  gap:7%;
  align-items:center;
  margin:0 0 90px
}
.feature-reverse .feature-visual {
  order:2
}
.feature-reverse .feature-info {
  order:1
}
.feature-visual {
  min-height:490px;
  position:relative;
  overflow:hidden;
  background:#101a1a;
  border:1px solid #273333
}
.phenara-photo {
  margin:0;
  background:#101615
}
.phenara-photo img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  filter:saturate(.78) contrast(1.04)
}
.phenara-photo:after {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(0deg,rgba(4,9,10,.72),transparent 38%);
  pointer-events:none
}
.visual-caption {
  position:absolute;
  bottom:24px;
  left:26px;
  color:#a0b5b0;
  z-index:4
}
.feature-index {
  display:flex;
  justify-content:space-between;
  color:var(--accent);
  border-bottom:1px solid var(--line);
  padding-bottom:19px;
  margin-bottom:37px
}
.feature-index span {
  color:#718382
}
.feature-info h3 {
  font-size:clamp(49px,5vw,75px);
  line-height:1.1;
  letter-spacing:-.065em;
  margin-bottom:22px
}
.feature-lede {
  font-size:20px!important;
  color:#dce7e2!important;
  line-height:1.5!important
}
.thesis-title {
  margin:-7px 0 25px;
  color:#a5b7b3!important;
  font-size:13px!important;
  line-height:1.55!important;
  font-style:italic
}
.project-subsection {
  margin-top:28px
}
.project-subsection>span {
  color:var(--accent);
  font-size:9px;
  font-weight:600;
  letter-spacing:.15em
}
.project-subsection .project-proof {
  margin-top:14px
}
.result-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  margin:14px 0 20px;
  padding:0;
  border-top:1px solid var(--line);
  list-style:none
}
.result-list li {
  padding:15px 10px 15px 0;
  border-bottom:1px solid var(--line)
}
.result-list li:nth-child(even) {
  padding-left:14px;
  border-left:1px solid var(--line)
}
.result-list strong,
.result-list span {
  display:block
}
.result-list strong {
  color:#e7efec;
  font-family:Manrope,sans-serif;
  font-size:18px;
  font-weight:400
}
.result-list span {
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  line-height:1.45
}
.project-links {
  display:flex;
  flex-wrap:wrap;
  gap:24px
}
.feature-info p {
  color:var(--muted);
  font-size:15px;
  line-height:1.9;
  max-width:440px
}
.feature-phenara {
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:0 24px;
  align-items:start
}
.feature-phenara .feature-info { display:contents }
.feature-phenara .feature-visual {
  grid-column:1/7;
  grid-row:1/6;
  width:100%;
  min-height:0;
  aspect-ratio:1/1
}
.feature-phenara .feature-index,
.feature-phenara .feature-info>h3,
.feature-phenara .feature-lede,
.feature-phenara .phenara-role,
.feature-phenara .project-metrics { grid-column:7/-1 }
.feature-phenara .feature-index { grid-row:1 }
.feature-phenara .feature-info>h3 { grid-row:2 }
.feature-phenara .feature-lede { grid-row:3 }
.feature-phenara .phenara-role { grid-row:4; max-width:none }
.feature-phenara .project-metrics { grid-row:5; align-self:end }
.feature-phenara .phenara-engineering {
  grid-column:1/7;
  grid-row:6;
  margin-top:52px;
  padding-right:28px
}
.feature-phenara .phenara-evaluation {
  grid-column:7/-1;
  grid-row:6;
  margin-top:52px
}
.feature-phenara .project-limitation {
  grid-column:1/10;
  grid-row:7;
  margin-top:26px
}
.feature-phenara .tags {
  grid-column:1/8;
  grid-row:8;
  align-self:center
}
.feature-phenara .inline-link {
  grid-column:9/-1;
  grid-row:8;
  justify-self:end;
  align-self:center
}
.phenara-workflow {
  grid-column:1/-1;
  grid-row:9;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin-top:54px
}
.phenara-workflow figure {
  min-width:0;
  margin:0;
  overflow:hidden;
  border:1px solid var(--line);
  background:#0a1114
}
.phenara-workflow img {
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  object-position:top center;
  background:#eaf0f5
}
.phenara-workflow figcaption { padding:18px }
.phenara-workflow figcaption strong,
.phenara-workflow figcaption span { display:block }
.phenara-workflow figcaption strong {
  color:var(--accent);
  font-size:11px;
  font-weight:500;
  letter-spacing:.06em
}
.phenara-workflow figcaption span {
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6
}
.feature-epidemiology {
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:0 24px;
  align-items:start;
  padding-top:34px;
  border-top:1px solid var(--line)
}
.feature-epidemiology .feature-info { display:contents }
.feature-epidemiology .feature-index {
  grid-column:1/-1;
  grid-row:1;
  margin-bottom:44px
}
.feature-epidemiology .feature-visual {
  grid-column:7/-1;
  grid-row:2/6;
  order:initial;
  width:100%;
  min-height:0;
  aspect-ratio:1 / 1;
  margin:0
}
.feature-epidemiology .feature-info>h3 {
  grid-column:1/7;
  grid-row:2;
  margin-top:0
}
.feature-epidemiology .thesis-title {
  grid-column:1/7;
  grid-row:3
}
.feature-epidemiology .feature-lede {
  grid-column:1/7;
  grid-row:4;
  max-width:610px
}
.feature-epidemiology .feature-lede+p {
  grid-column:1/7;
  grid-row:5;
  max-width:610px;
  margin-bottom:64px
}
.feature-epidemiology .epi-methods {
  grid-column:1/7;
  grid-row:6;
  margin:0;
  padding-right:28px
}
.feature-epidemiology .project-metrics {
  grid-column:1/7;
  grid-row:7;
  align-self:start;
  margin-right:28px
}
.feature-epidemiology .dataset-detail {
  grid-column:1/7;
  grid-row:8;
  margin:0 28px 0 0;
  max-width:none
}
.feature-epidemiology .epi-results {
  grid-column:7/-1;
  grid-row:6/9;
  margin:0
}
.feature-epidemiology .epi-results>.result-list {
  margin-top:24px
}
.feature-epidemiology .epi-results>p,
.feature-epidemiology .project-limitation { max-width:none }
.feature-epidemiology .scarcity-explorer {
  grid-column:1/-1;
  grid-row:9;
  margin-top:64px;
  padding:26px 32px 30px
}
.feature-epidemiology #scarcity-chart {
  max-width:820px;
  max-height:410px;
  margin:8px auto 0
}
.feature-epidemiology .scarcity-series {
  grid-template-columns:repeat(5,minmax(0,1fr))
}
.feature-epidemiology .project-limitation {
  grid-column:1/9;
  grid-row:10;
  margin-top:26px
}
.feature-epidemiology .tags {
  grid-column:1/8;
  grid-row:12
}
.feature-epidemiology .project-links {
  grid-column:9/-1;
  grid-row:12;
  justify-content:flex-end;
  align-self:center
}
.project-proof {
  display:grid;
  gap:10px;
  margin:24px 0;
  padding:0;
  list-style:none
}
.project-metrics {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  margin:26px 0 22px;
  border-block:1px solid var(--line)
}
.project-metrics div {
  padding:17px 10px 16px 0
}
.project-metrics div+div {
  padding-left:14px;
  border-left:1px solid var(--line)
}
.project-metrics strong,
.project-metrics span {
  display:block
}
.project-metrics strong {
  color:var(--text);
  font-family:Manrope,sans-serif;
  font-size:25px;
  font-weight:400
}
.project-metrics span {
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase
}
.project-limitation {
  margin:0 0 25px;
  padding:13px 15px;
  border-left:2px solid var(--warm);
  background:#d89b730b;
  font-size:12px!important;
  line-height:1.65!important
}
.project-limitation strong {
  color:#d8ae8d;
  font-weight:500
}
.scarcity-explorer {
  margin:25px 0;
  padding:18px;
  border:1px solid #2a3b3d;
  border-radius:12px;
  background:linear-gradient(145deg,#101d20,#0a1215)
}
.scarcity-heading {
  display:flex;
  justify-content:space-between;
  gap:16px;
  color:#9db0af;
  font-size:9px;
  font-weight:600;
  letter-spacing:.13em
}
.scarcity-heading output {
  color:var(--accent)
}
#scarcity-chart {
  display:block;
  width:100%;
  height:auto;
  overflow:visible;
  margin-top:16px
}
.scarcity-grid {
  stroke:#adbfbb1d;
  stroke-width:1
}
.scarcity-axis-label {
  fill:#7f9291;
  font-family:'DM Sans',sans-serif;
  font-size:12px
}
.scarcity-axis {
  stroke:#adbfbb38;
  stroke-width:1
}
.scarcity-axis-title {
  fill:#aab9b6;
  font-family:'DM Sans',sans-serif;
  font-size:12px;
  font-weight:400
}
.scarcity-focus {
  stroke:#d9e5e244;
  stroke-width:1;
  stroke-dasharray:4 5
}
.scarcity-line {
  fill:none;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:stroke-dashoffset 1.25s cubic-bezier(.2,.72,.25,1)
}
.scarcity-point {
  stroke:#0b1518;
  stroke-width:2
}
.scarcity-endpoint {
  opacity:0;
  transition:opacity .28s ease
}
.scarcity-series {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:10px
}
.scarcity-series>div {
  display:grid;
  grid-template-columns:8px 1fr auto;
  align-items:center;
  gap:8px;
  min-height:30px;
  padding:7px 9px;
  color:#aab9b6;
  font-size:10px;
  text-align:left;
}
.scarcity-series>div i {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--series-color)
}
.scarcity-series>div strong {
  color:#e2ebe8;
  font-size:11px;
  font-weight:500;
  font-variant-numeric:tabular-nums
}
@media(max-width:600px) {
  .scarcity-explorer {
    padding:14px 11px
  }
  .scarcity-series {
    grid-template-columns:1fr
  }
  .result-list {
    grid-template-columns:1fr
  }
  .result-list li:nth-child(even) {
    padding-left:0;
    border-left:0
  }
}
.project-proof li {
  position:relative;
  padding-left:18px;
  color:#bdcbc7;
  font-size:13px;
  line-height:1.55
}
.project-proof li:before {
  content:'↳';
  position:absolute;
  left:0;
  color:var(--accent)
}
.tags {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:26px 0 34px
}
.tags span {
  border:1px solid #33413f;
  color:#9baaa7;
  padding:8px 12px;
  border-radius:100px;
  font-size:11px
}
.inline-link {
  display:inline-block;
  color:var(--accent);
  font-size:13px;
  border-bottom:1px solid #557b6d;
  padding-bottom:8px
}
.inline-link span {
  margin-left:18px
}

/* 05 — CSS project illustrations */
.phenara-art {
  background:radial-gradient(ellipse at 55% 63%,#284735 0%,#15241e 34%,#0a1111 80%)
}
.phenara-art:before,.circuits-art:before {
  content:'';
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(0deg,transparent 0 37px,#ffffff06 38px),repeating-linear-gradient(90deg,transparent 0 37px,#ffffff06 38px);
  mask-image:linear-gradient(0deg,#000,transparent 85%)
}
.rig {
  position:absolute;
  left:15%;
  right:15%;
  top:17%;
  bottom:14%;
  border:7px solid #526260;
  box-shadow:0 0 0 2px #1e2b2a,0 25px 90px #0009;
  transform:perspective(800px) rotateY(-8deg)
}
.rig-top {
  height:12px;
  background:#6c7c77;
  position:absolute;
  top:18px;
  left:0;
  right:0
}
.rig-light {
  position:absolute;
  top:42px;
  left:20%;
  width:60%;
  height:18px;
  background:#e1f2d7;
  box-shadow:0 0 25px #b9f5c0,0 0 110px #b9f5c044
}
.rig-camera {
  position:absolute;
  top:7px;
  left:48%;
  height:31px;
  width:25px;
  background:#161c1d;
  border:3px solid #657571
}
.rig-camera:after {
  content:'';
  position:absolute;
  bottom:-8px;
  left:5px;
  width:9px;
  height:9px;
  background:#060b0c;
  border:2px solid #a0b6b1;
  border-radius:50%
}
.rig-shelf {
  position:absolute;
  bottom:23%;
  left:3%;
  right:3%;
  height:9px;
  background:#67776f
}
.plant {
  position:absolute;
  bottom:calc(23% + 9px);
  width:56px;
  height:70px
}
.p1 {
  left:15%
}
.p2 {
  left:42%;
  transform:scale(1.22)
}
.p3 {
  left:70%;
  transform:scale(.88)
}
.plant:before {
  content:'';
  position:absolute;
  bottom:0;
  left:22px;
  width:30px;
  height:26px;
  background:linear-gradient(90deg,#1d2423,#48504a);
  clip-path:polygon(0 0,100% 0,85% 100%,15% 100%)
}
.plant:after {
  content:'';
  position:absolute;
  bottom:23px;
  left:36px;
  width:2px;
  height:47px;
  background:#729c5d
}
.plant i {
  position:absolute;
  bottom:47px;
  left:20px;
  width:27px;
  height:14px;
  background:#80b36c;
  border-radius:100% 0 100% 0;
  transform:rotate(25deg)
}
.plant i:nth-child(2) {
  left:36px;
  transform:scaleX(-1) rotate(25deg)
}
.plant i:nth-child(3) {
  bottom:65px;
  left:29px;
  transform:rotate(55deg);
  width:19px
}
/* 05b — Epidemiological transmission-tree visualization */
.model-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 47% 53%, rgba(32, 77, 76, 0.38), transparent 65%),
    #081315;
}

#epidemic-tree {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.circuits-art {
  background:radial-gradient(circle at center,#3d3026 0%,#171b19 37%,#0b1112 85%)
}
.chip {
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%) rotate(-18deg);
  width:190px;
  height:190px;
  border:2px solid #b7855c;
  background:repeating-linear-gradient(45deg,#222b29 0 14px,#1b2423 14px 28px);
  box-shadow:0 0 0 20px #bd8e5315,0 0 0 55px #bd8e530a,0 0 100px #bd8e5340
}
.chip:before,.chip:after {
  content:'';
  position:absolute;
  left:-30px;
  right:-30px;
  height:12px;
  background:repeating-linear-gradient(90deg,#b98e5e 0 7px,transparent 7px 20px)
}
.chip:before {
  top:-20px
}
.chip:after {
  bottom:-20px
}
.chip-center {
  position:absolute;
  inset:35px;
  display:grid;
  place-items:center;
  background:#0c1514;
  border:1px solid #61716a;
  color:#d5ab82;
  font-size:32px;
  letter-spacing:.1em
}

/* 06 — Research, about, CV and contact */
.research-band {
  background:#101a1b;
  border-block:1px solid var(--line);
  padding:145px 0
}
.research-content {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12%
}
.research-content h2 {
  margin-top:30px
}
.research-item {
  border-top:1px solid #3a4a49;
  padding:26px 0 34px
}
.research-year {
  color:var(--accent)
}
.research-item h3 {
  font-size:22px;
  line-height:1.45;
  letter-spacing:-.025em;
  margin:17px 0
}
.research-item p,.research-note {
  font-size:13px;
  color:var(--muted);
  line-height:1.7
}
.research-item a {
  color:var(--accent);
  font-size:12px;
  border-bottom:1px solid #557b6d;
  padding-bottom:5px
}
.research-note {
  font-style:italic
}
.about-section {
  padding:120px 0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12%
}
/* 06a — Interactive CAD models */
.engineering-section {
  padding:120px 0;
  border-block:1px solid var(--line);
  background:#0c1417
}
.engineering-heading {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px 50px;
  align-items:end;
  margin-bottom:55px
}
.engineering-heading .section-number {
  grid-column:1/-1
}
.engineering-heading h2 {
  margin:0;
  font-size:clamp(48px,5.6vw,83px);
  line-height:1.1;
  letter-spacing:-.065em
}
.engineering-heading p {
  max-width:390px;
  justify-self:end;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.7
}
.model-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px
}
.model-card {
  min-width:0;
  border:1px solid #29373a;
  background:#0a1114
}
.model-stage {
  position:relative;
  aspect-ratio:1 / 1;
  overflow:hidden;
  background:radial-gradient(circle at 50% 42%,#223136,#0b1316 68%)
}
.model-stage model-viewer {
  display:block;
  width:100%;
  height:100%;
  --poster-color:transparent;
  --progress-bar-color:var(--accent)
}
.model-status {
  position:absolute;
  inset:0;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:radial-gradient(circle at 50% 42%,#223136,#0b1316 68%);
  color:#edf4f1;
  text-align:center;
  transition:opacity .35s ease,visibility .35s ease
}
.model-status strong { font-size:12px;letter-spacing:.04em }
.model-status small { color:var(--muted);font-size:10px }
.model-spinner {
  width:27px;
  height:27px;
  border:1px solid #52615f;
  border-top-color:var(--accent);
  border-radius:50%;
  animation:model-spin .8s linear infinite
}
.model-stage.is-loaded .model-status { opacity:0;visibility:hidden;pointer-events:none }
.model-stage.has-error .model-status { padding:24px;background:#111a1d }
.model-stage.has-error .model-spinner { display:none }
.model-stage.has-error .model-status strong { color:#ffb5a7 }
.model-controls {
  position:absolute;
  left:12px;
  bottom:14px;
  z-index:2;
  padding:7px 10px;
  border:1px solid rgba(149,171,164,.34);
  border-radius:100px;
  background:rgba(8,15,17,.72);
  color:#b9c8c3;
  font-size:8px;
  letter-spacing:.12em;
  pointer-events:none;
  opacity:0;
  transition:opacity .35s ease
}
.model-stage.is-loaded .model-controls { opacity:1 }
.model-stage.is-used .model-controls { opacity:0 }
@keyframes model-spin { to { transform:rotate(360deg) } }
.model-reset {
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:2;
  padding:8px 11px;
  border:1px solid #52615f;
  border-radius:100px;
  background:rgba(8,15,17,.78);
  color:#cad6d2;
  font:inherit;
  font-size:10px;
  backdrop-filter:blur(8px);
  cursor:pointer
}
.model-reset:hover,
.model-reset:focus-visible {
  border-color:var(--accent);
  color:var(--accent)
}
.model-copy {
  padding:22px
}
.model-copy>span {
  color:var(--accent);
  font-size:8px;
  font-weight:600;
  letter-spacing:.13em
}
.model-copy h3 {
  margin:12px 0 10px;
  font-size:24px;
  letter-spacing:-.035em
}
.model-copy p {
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.65
}
@media(max-width:900px) {
  .model-grid {
    grid-template-columns:1fr 1fr
  }
  .engineering-heading {
    grid-template-columns:1fr
  }
  .engineering-heading p {
    justify-self:start
  }
}
@media(max-width:600px) {
  .engineering-section {
    padding:90px 0
  }
  .model-grid {
    grid-template-columns:1fr
  }
}
.about-section h2 {
  margin-top:28px
}
.about-right {
  padding-top:40px
}
.about-big {
  font-size:25px!important;
  line-height:1.5!important;
  color:var(--text)!important
}
.about-right p {
  font-size:15px;
  line-height:1.9;
  color:var(--muted)
}
.experience-list {
  margin:36px 0 32px;
  border-top:1px solid var(--line)
}
.experience-list div {
  display:grid;
  grid-template-columns:105px 1fr;
  gap:3px 18px;
  padding:18px 0;
  border-bottom:1px solid var(--line)
}
.experience-list span {
  grid-row:1 / span 2;
  color:var(--accent);
  font-size:10px;
  letter-spacing:.12em
}
.experience-list strong {
  color:#e0e9e6;
  font-size:14px;
  font-weight:500
}
.experience-list small {
  color:var(--muted);
  font-size:12px;
  line-height:1.5
}
.skills {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:34px
}
.skills span {
  border-bottom:1px solid #536963;
  padding:8px 0;
  margin-right:22px;
  color:#a6b9b1;
  font-size:12px
}
.cv-section {
  background:#0e1717;
  padding:100px 0;
  border-block:1px solid var(--line)
}
.cv-content {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15%;
  align-items:center
}
.cv-content h2 {
  margin:25px 0 34px
}
.cv-content p {
  font-size:16px;
  line-height:1.8;
  color:#c6d2ce
}
.cv-content .cv-small {
  color:var(--muted);
  font-size:14px;
  max-width:420px
}
.cv-panel {
  border:1px solid #42534e;
  padding:42px;
  background:linear-gradient(145deg,#192623,#101818);
  min-height:320px;
  display:flex;
  flex-direction:column;
  align-items:flex-start
}
.cv-panel-top {
  color:var(--accent)
}
.cv-rule {
  width:100%;
  height:1px;
  background:#45534f;
  margin:26px 0
}
.cv-panel h3 {
  font-size:40px;
  line-height:1.18;
  letter-spacing:-.05em;
  margin:0 0 20px
}
.cv-panel p {
  font-size:13px;
  color:var(--muted);
  margin-bottom:27px
}
.cv-panel small {
  font-size:10px;
  color:#7e8e89;
  margin-top:15px
}
.contact {
  padding:110px 0
}
.contact h2 {
  margin:30px 0 42px
}
.contact-email {
  font-size:clamp(18px,3vw,36px);
  font-weight:300;
  border-bottom:1px solid #607a72;
  padding-bottom:15px;
  display:inline-flex;
  gap:35px;
  color:var(--accent)
}
.social-links {
  display:flex;
  gap:35px;
  margin-top:34px;
  font-size:13px;
  color:#b5c4be
}
.social-links a:hover {
  color:var(--accent)
}
.footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  border-top:1px solid var(--line);
  padding-block:30px;
  color:#73827f
}
.footer a:hover {
  color:var(--accent)
}

/* 07 — Scroll effects and responsive layouts */
.reveal {
  opacity:0;
  transform:translateY(34px);
  transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1)
}
.reveal.visible {
  opacity:1;
  transform:none
}
@media(max-width:900px) {
  .container,.site-header {
    width:calc(100% - 52px)
  }
  .site-header {
    width:100%;
    padding-inline:26px
  }
  .hero {
    min-height:700px
  }
  .feature,.research-content,.about-section,.cv-content {
    grid-template-columns:1fr;
    gap:45px
  }
  .feature-reverse .feature-visual,.feature-reverse .feature-info {
    order:initial
  }
  .feature-epidemiology {
    display:block;
    padding-top:28px
  }
  .feature-epidemiology .feature-info {
    display:block
  }
  .feature-epidemiology .feature-visual {
    min-height:0;
    margin-bottom:45px
  }
  .feature-epidemiology .feature-lede,
  .feature-epidemiology .feature-lede+p {
    max-width:620px
  }
  .feature-epidemiology .scarcity-explorer {
    margin-top:42px;
    padding:22px
  }
  .feature-epidemiology .scarcity-series {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .feature-epidemiology .project-links {
    justify-content:flex-start
  }
  .feature-visual {
    min-height:410px
  }
  .feature {
    margin-bottom:95px
  }
  .section-heading {
    grid-template-columns:1fr;
    gap:20px
  }
  .section-heading p {
    justify-self:start
  }
  .research-band,.about-section,.contact {
    padding-block:100px
  }
  .about-right {
    padding-top:0
  }
  .cv-panel {
    max-width:520px
  }
}
@media(max-width:600px) {
  .container,.site-header {
    width:calc(100% - 38px)
  }
  .site-header {
    width:100%;
    height:72px;
    padding-inline:19px
  }
  .feature-epidemiology .feature-visual {
    min-height:0
  }
  .feature-epidemiology .scarcity-explorer {
    padding:14px 11px
  }
  .feature-epidemiology .scarcity-series {
    grid-template-columns:1fr
  }
  .site-header nav {
    gap:14px
  }
  .site-header nav a {
    font-size:11px
  }
  .header-contact {
    display:none
  }
  .hero {
    height:780px;
    min-height:680px
  }
  .hero-content {
    padding-top:0
  }
  h1 {
    font-size:clamp(52px,11.4vw,72px)
  }
  .hero-intro {
    font-size:15px;
    max-width:320px
  }
  .hero-shade {
    background:linear-gradient(90deg,#080d10 0%,#080d10d9 50%,#080d1080 100%),linear-gradient(0deg,#080d10,transparent 35%)
  }
  .hero-bottom {
    font-size:8px
  }
  .hero-bottom>span {
    max-width:175px;
    line-height:1.7
  }
  .section {
    padding-block:95px
  }
  .section-heading {
    margin-bottom:48px
  }
  .feature-visual {
    min-height:340px
  }
  .feature-info h3 {
    font-size:55px
  }
  .feature {
    gap:32px;
    margin-bottom:75px
  }
  .experience-list div {
    grid-template-columns:1fr
  }
  .experience-list span {
    grid-row:auto
  }
  .feature-index {
    font-size:9px
  }
  .research-item h3 {
    font-size:19px
  }
  .cv-panel {
    padding:30px;
    min-height:400px
  }
  .footer {
    flex-wrap:wrap;
    font-size:8px
  }
  .footer span:nth-child(2) {
    display:none
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto
  }
  .reveal {
    opacity:1;
    transform:none;
    transition:none
  }
  .pulse {
    animation:none
  }
}

/* 02b — Accessible navigation and personal branding */
.header-name {
  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.site-header nav {
  gap: 30px;
}

.site-header nav a,
.site-header .header-contact {
  color: #d5dfdc;
  font-size: 14px;
  font-weight: 500;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header .header-contact:hover,
.site-header .header-contact:focus-visible {
  color: var(--accent);
}

.site-header nav a,
.site-header .header-contact {
  position:relative
}
.site-header nav a::after,
.site-header .header-contact::after {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-10px;
  height:1px;
  background:var(--accent);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .22s ease
}
.site-header nav a.is-active,
.site-header .header-contact.is-active {
  color:var(--accent)
}
.site-header nav a.is-active::after,
.site-header .header-contact.is-active::after {
  transform:scaleX(1)
}

.site-header a:focus-visible,
.hero-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 3px;
}

/* 03a — Hero: name first, specialties second */
.hero-identity {
  max-width: 760px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: #b5c6c2;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.19em;
}

.hero-identity h1 {
  margin: 0;
  font-size: clamp(64px, 8.1vw, 126px);
  font-weight: 400;
  letter-spacing: -0.077em;
  line-height: 1.1;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0 0;
  color: #d4dfdb;
  font-size: 16px;
}

.hero-location svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid #41534f;
  border-radius: 9px;
  background: rgba(9, 21, 22, 0.75);
  color: #e3efeb;
  font-size: 13px;
  transition: background 180ms, border-color 180ms, transform 180ms;
}

.hero-links a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(30, 65, 58, 0.7);
}

.hero-links svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--accent);
}

.hero-description {
  margin-top: 48px;
  max-width: 490px;
}

.hero-discipline {
  margin: 0 0 12px;
  color: #e0e9e6;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.hero-discipline span {
  padding: 0 5px;
  color: var(--accent);
}

.hero-description .hero-intro {
  margin-bottom: 0;
  font-size: 16px;
}

.hero-description .actions {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .site-header nav {
    gap: 18px;
  }

  .hero-identity h1 {
    font-size: clamp(55px, 8vw, 92px);
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    height: 108px;
    row-gap: 8px;
  }

  .header-name {
    font-size: 18px;
  }

  .site-header nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .site-header nav a {
    font-size: 13px;
  }

  .hero {
    min-height: 820px;
    height: auto;
    padding-block: 165px 120px;
  }

  .hero-identity h1 {
    font-size: clamp(49px, 11vw, 68px);
  }

  .hero-kicker {
    font-size: 9px;
  }

  .hero-location {
    font-size: 14px;
  }

  .hero-links {
    gap: 8px;
  }

  .hero-links a {
    padding: 10px 11px;
    font-size: 12px;
  }

  .hero-links svg {
    width: 17px;
    height: 17px;
  }

  .hero-description {
    margin-top: 38px;
  }

  .hero-discipline {
    font-size: 18px;
  }
}


/* --------------------------------------------------------------------------
   Epidemiology project — fully connected neural network
   -------------------------------------------------------------------------- */
.neural-demo {
  margin: 26px 0 18px;
  padding: 16px 16px 12px;
  border: 1px solid rgba(156, 222, 201, .19);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(17, 33, 38, .78), rgba(8, 16, 21, .88));
  overflow: hidden;
}
.neural-demo-heading, .neural-demo-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  letter-spacing: .12em;
  color: #a4b8b7;
  font-weight: 650;
}
.neural-demo-status { color: #a9e9d7; white-space: nowrap; }
.neural-demo-status i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 4px;
  vertical-align: 2px;
  border-radius: 50%;
  background: #9cdec9;
  box-shadow: 0 0 9px #9cdec9;
}
#neural-network { display: block; width: 100%; height: auto; margin: 6px 0 2px; overflow: visible; }
.neural-edge { stroke: rgba(148, 181, 184, .21); stroke-width: 1; fill: none; }
.neural-node { fill: #13272c; stroke: rgba(170, 214, 206, .63); stroke-width: 1.5; }
.neural-active-edge { stroke: #a8f9de; stroke-width: 2.4; fill: none; opacity: 0; filter: url(#neural-glow); }
.neural-active-node { fill: #c9ffec; stroke: #d5fff2; stroke-width: 2; opacity: 0; filter: url(#neural-glow); }
.neural-demo-labels { color: #849c9c; }
@media (max-width: 600px) {
  .neural-demo { padding: 12px 10px 10px; }
.neural-demo-heading, .neural-demo-labels { font-size: 8px; letter-spacing: .055em; }
}

/* Readability pass — quieter labels, larger explanatory copy */
.section-heading p,
.engineering-heading p,
.hero-description .hero-intro,
.feature-info p,
.about-right p,
.research-item p,
.research-note {
  font-size:17px;
  line-height:1.75
}
.feature-lede { font-size:21px!important }
.thesis-title { font-size:15px!important }
.project-proof li {
  font-size:15px;
  line-height:1.65
}
.project-limitation {
  font-size:15px!important;
  line-height:1.65!important
}
.result-list span {
  font-size:13px;
  line-height:1.5
}
.result-list strong { font-size:17px }
.model-copy p {
  font-size:15px;
  line-height:1.65
}
.project-subsection>span,
.scarcity-heading,
.model-copy>span {
  font-weight:500;
  letter-spacing:.055em;
  text-transform:none
}
.project-subsection>span { font-size:12px }
.scarcity-heading { font-size:11px }
.model-copy>span { font-size:10px }
@media(max-width:600px) {
  .section-heading p,
  .engineering-heading p,
  .hero-description .hero-intro,
  .feature-info p,
  .about-right p,
  .research-item p,
  .research-note { font-size:16px }
}

/* Alignment pass */
.feature { align-items:start }
.feature-phenara .feature-visual { align-self:start }
.cv-content { align-items:start }
.model-card {
  display:flex;
  flex-direction:column
}
.model-copy {
  display:grid;
  grid-template-rows:auto auto 1fr;
  flex:1
}
.model-copy h3 { align-self:start }
.model-copy p { align-self:start }
.dataset-detail {
  margin:22px 0 0;
  padding:16px 18px;
  border-left:2px solid var(--accent);
  background:rgba(156,222,201,.055);
  font-size:14px!important;
  line-height:1.65!important
}
.dataset-detail summary {
  color:var(--accent);
  font-size:13px;
  cursor:pointer
}
.dataset-detail p {
  margin:12px 0 0;
  max-width:none;
  font-size:14px!important;
  line-height:1.65!important
}
.dataset-detail strong { color:#e8f2ef }
.project-metrics { align-items:stretch }
.project-metrics>div {
  display:flex;
  flex-direction:column;
  justify-content:flex-start
}
.feature-epidemiology .tags {
  align-self:start;
  margin-top:26px;
  margin-bottom:0
}
.feature-epidemiology .project-links {
  align-self:start;
  margin-top:30px
}
@media(max-width:900px) {
  .feature-phenara .feature-info { display:block }
  .feature-phenara .feature-visual {
    grid-column:1;
    grid-row:auto;
    width:100%;
    min-height:410px;
    aspect-ratio:auto
  }
  .phenara-workflow {
    grid-column:1;
    grid-row:auto;
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .feature-phenara .phenara-engineering,
  .feature-phenara .phenara-evaluation {
    margin-top:32px;
    padding-right:0
  }
  .feature-phenara .project-limitation { margin-top:26px }
  .feature-phenara .inline-link { display:inline-flex; margin-top:28px }
  .feature-epidemiology .tags { margin-bottom:24px }
  .feature-epidemiology .project-links { margin-top:0 }
  .feature-epidemiology .epi-methods { padding-right:0 }
  .feature-epidemiology .project-metrics,
  .feature-epidemiology .dataset-detail { margin-right:0 }
}

/* Compact first screen: the work begins sooner on a CV portfolio. */
@media(min-width:901px) {
  .hero {
    min-height:700px;
    height:min(790px,100svh)
  }
  .hero-description { margin-top:28px }
}

/* Mobile navigation and compact case-study controls */
.nav-toggle,
.mobile-nav-contact { display:none }
.hero-direction {
  margin:12px 0 0;
  color:#c6d5d1!important;
  font-size:14px!important;
  line-height:1.55!important
}
.mobile-detail>summary {
  color:var(--accent);
  font-size:12px;
  font-weight:500;
  letter-spacing:.055em;
  list-style:none;
  cursor:default
}
.mobile-detail>summary::-webkit-details-marker { display:none }

@media(max-width:600px) {
  .site-header {
    height:72px;
    min-height:72px;
    flex-wrap:nowrap;
    align-content:center;
    row-gap:0
  }
  .nav-toggle {
    display:flex;
    align-items:center;
    gap:10px;
    min-width:72px;
    min-height:44px;
    justify-content:flex-end;
    border:0;
    background:transparent;
    color:var(--text);
    font:inherit;
    font-size:13px;
    cursor:pointer
  }
  .nav-toggle i,
  .nav-toggle i::before {
    display:block;
    width:18px;
    height:1px;
    background:currentColor;
    content:'';
    transition:transform .2s ease
  }
  .nav-toggle i::before { transform:translateY(5px) }
  .site-header.nav-open .nav-toggle i { transform:translateY(3px) rotate(45deg) }
  .site-header.nav-open .nav-toggle i::before { transform:rotate(-90deg) }
  .site-header nav {
    position:absolute;
    top:72px;
    left:0;
    right:0;
    order:initial;
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0;
    padding:0 19px;
    border-bottom:1px solid transparent;
    background:rgba(8,13,16,.97);
    backdrop-filter:blur(16px);
    opacity:0;
    visibility:hidden;
    transform:translateY(-8px);
    transition:opacity .2s ease,transform .2s ease,visibility .2s,border-color .2s
  }
  .site-header.nav-open nav {
    padding-block:10px 14px;
    border-color:var(--line);
    opacity:1;
    visibility:visible;
    transform:none
  }
  .site-header nav a {
    min-height:46px;
    display:flex;
    align-items:center;
    font-size:14px
  }
  .mobile-nav-contact { display:flex!important }
  .site-header nav a::after { bottom:5px }
  .hero {
    min-height:680px;
    padding-block:120px 72px
  }
  .hero-description { margin-top:28px }
  .mobile-detail>summary {
    position:relative;
    display:flex;
    align-items:center;
    min-height:44px;
    padding-right:30px;
    cursor:pointer
  }
  .mobile-detail>summary::after {
    position:absolute;
    right:4px;
    content:'＋';
    color:var(--muted);
    font-size:17px;
    font-weight:300
  }
  .mobile-detail[open]>summary::after { content:'−' }
  .feature-epidemiology .scarcity-series,
  .scarcity-series { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .model-reset {
    min-width:88px;
    min-height:44px;
    font-size:12px
  }
  .phenara-workflow {
    grid-column:auto;
    grid-row:auto;
    grid-template-columns:1fr;
    margin-top:42px
  }
  .phenara-workflow img { aspect-ratio:16/10 }
}
