/* Shared presentation for the static academic portfolio. */
:root {
  --bg: #fff;
  --text: #35434a;
  --muted: #58666e;
  --link: #246c7f;
  --link-hover: #164d5c;
  --border: #dce4e7;
  --soft: #f5f8f8;
  --masthead-h: 76px;
  --max-w: 1140px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-padding-top: calc(var(--masthead-h) + 24px); }
body { margin: 0; padding-top: var(--masthead-h); background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.65; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
#main:focus { outline: none; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px 18px; background: var(--text); color: #fff; z-index: 2000; }
.skip-link:focus { top: 12px; }
.masthead { position: fixed; inset: 0 0 auto; z-index: 1000; min-height: var(--masthead-h); background: #fff; border-bottom: 1px solid var(--border); }
.masthead__inner-wrap { max-width: var(--max-w); min-height: var(--masthead-h); margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-title { font-size: 1.05rem; font-weight: 750; text-decoration: none; color: var(--text); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.nav-links a { display: block; padding: 10px 12px; border-radius: 4px; font-size: .9rem; text-decoration: none; color: var(--text); }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--soft); color: var(--link); }
.nav-links a[aria-current="page"] { font-weight: 750; }
.nav-hamburger { display: none; position: relative; flex-shrink: 0; width: 44px; height: 44px; padding: 0; background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; }
.navicon, .navicon::before, .navicon::after { position: absolute; width: 20px; height: 2px; background: currentColor; }
.navicon { left: 11px; top: 20px; }
.navicon::before, .navicon::after { content: ""; left: 0; }
.navicon::before { top: -6px; }
.navicon::after { top: 6px; }
.nav-hamburger[aria-expanded="true"] .navicon { background: transparent; }
.nav-hamburger[aria-expanded="true"] .navicon::before { top: 0; transform: rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .navicon::after { top: 0; transform: rotate(-45deg); }
#main { max-width: var(--max-w); padding: 0 28px 64px; margin: 48px auto 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; }
#main > * { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--masthead-h) + 28px); text-align: left; }
.avatar { display: block; width: 132px; height: 132px; object-fit: cover; border: 1px solid var(--border); border-radius: 50%; padding: 4px; margin-bottom: 20px; }
.author-name { font-weight: 750; font-size: 1rem; margin: 0 0 8px; }
.author-bio { font-size: .85rem; line-height: 1.6; color: var(--muted); margin: 0 0 12px; }
.author-location { color: var(--muted); font-size: .82rem; margin: 0 0 20px; }
.btn-cv { display: block; text-align: center; padding: 9px 14px; border: 1px solid var(--border); border-radius: 5px; font-weight: 650; font-size: .83rem; text-decoration: none; }
.social-icons { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 20px 0 0; list-style: none; font-size: .8rem; }
.page-title { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 24px; }
.hero-role { color: var(--link); font-size: 1.06rem; line-height: 1.5; font-weight: 650; margin-top: -8px !important; max-width: 650px; }
.page-content p { margin: 0 0 20px; overflow-wrap: break-word; }
.page-content h2 { font-size: 1.32rem; line-height: 1.35; margin: 38px 0 16px; letter-spacing: -.015em; }
.page-content h3 { font-size: 1.05rem; line-height: 1.4; margin: 24px 0 10px; }
.page-content ul, .page-content ol { padding-left: 24px; margin: 0 0 24px; }
.page-content li { margin-bottom: 8px; }
.page-content .lede { font-size: 1.08rem; line-height: 1.75; }
.page-content .availability { font-size: .88rem; color: var(--muted); padding-left: 14px; border-left: 3px solid var(--border); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 5px; font-size: .86rem; line-height: 1.4; font-weight: 700; text-decoration: none; }
.btn-primary { background: var(--link); color: #fff; }
.btn-primary:hover { background: var(--link-hover); color: #fff; }
.btn-outline { border-color: #aabdc4; color: var(--text); }
.btn-outline:hover { background: var(--soft); }
.home-section { padding: 0 0 34px; margin: 34px 0 0; border-bottom: 1px solid var(--border); }
.home-section h2 { margin-top: 0; }
.section-heading { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.section-heading > a { font-size: .84rem; }
.featured-grid { display: grid; gap: 20px; }
.project-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.project-card .card-body { padding: 22px; }
.project-card h3 { margin: 0 0 12px; font-size: 1.08rem; }
.project-card h3 a { text-decoration: none; color: var(--text); }
.project-card h3 a:hover { color: var(--link); text-decoration: underline; }
.project-card p { font-size: .88rem; line-height: 1.6; margin: 0; }
.project-card .eyebrow { margin-bottom: 10px; color: var(--link); font-size: .68rem; }
.featured-card { display: grid; grid-template-columns: 35% minmax(0, 1fr); }
.featured-card > img { width: 100%; height: 100%; min-height: 180px; object-fit: contain; background: var(--soft); padding: 12px; border-right: 1px solid var(--border); }
.section-link { display: inline-block; margin-top: 14px; font-size: .82rem; font-weight: 650; }
.eyebrow { text-transform: uppercase; font-size: .72rem; font-weight: 750; letter-spacing: .07em; color: var(--muted); }
.theme-list { display: grid; gap: 20px; }
.theme-list > div { border-left: 2px solid var(--border); padding-left: 18px; }
.theme-list h3 { margin: 0 0 7px; }
.theme-list p { margin: 0; font-size: .92rem; color: var(--muted); }
.link-separator { padding: 0 8px; color: var(--muted); }
.contact-panel { margin-top: 32px; padding: 26px; border-radius: 8px; background: var(--soft); border: 1px solid var(--border); }
.contact-panel h2 { margin-top: 0; }
.contact-panel p:last-child { margin-bottom: 0; }
.contact-email { overflow-wrap: anywhere; }
.section-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 24px; margin: 24px 0 0; border-bottom: 1px solid var(--border); }
.section-nav a { padding: 8px 12px; font-size: .82rem; border: 1px solid var(--border); border-radius: 5px; text-decoration: none; }
.section-nav a:hover { background: var(--soft); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-group { margin-bottom: 40px; }
.research-area { padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.research-question { padding-left: 18px; border-left: 3px solid var(--link); font-style: italic; }
.work-links { list-style: none; padding-left: 0 !important; font-size: .9rem; }
.anchor-alias { display: block; }
.breadcrumb { display: inline-block; margin-bottom: 24px; font-size: .84rem; }
.case-study .page-title { font-size: clamp(1.65rem, 2.6vw, 2.2rem); }
.case-category { margin-top: -8px !important; }
.contribution { padding: 20px 22px; background: var(--soft); border-left: 3px solid var(--link); margin: 24px 0; }
.contribution h2 { margin: 0 0 8px; font-size: .85rem; }
.contribution p { margin: 0; font-size: .96rem; }
.case-result { font-weight: 600; }
.research-facet { margin: 26px 0; }
.page-content .facet-label { font-size: .78rem; letter-spacing: .055em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.research-facet p { margin-bottom: 16px; }
.method-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 10px; border: 1px solid var(--border); background: var(--soft); border-radius: 4px; font-size: .72rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: 22px; border-block: 1px solid var(--border); padding: 20px 0; margin: 22px 0; }
.stat { flex: 1 1 150px; min-width: 0; }
.stat-value { display: block; color: var(--link); font-size: 1.35rem; font-family: var(--mono); line-height: 1.4; }
.stat-label { display: block; margin-top: 6px; font-size: .72rem; color: var(--muted); }
.result-figure { margin: 28px 0; }
.figure-link { display: block; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--soft); }
.figure-link img { display: block; width: 100%; height: auto; }
.figure-link .external-figure { aspect-ratio: 16 / 9; object-fit: contain; }
.result-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.figure-hint { display: block; margin-top: 5px; }
.detail-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.detail-group h3 { font-size: .92rem; }
.detail-group li { font-size: .88rem; }
.project-links { display: flex; gap: 20px; flex-wrap: wrap; }
.project-links a { font-size: .9rem; font-weight: 650; }
.back-link { padding-top: 24px; border-top: 1px solid var(--border); margin-top: 32px !important; }
.meta-line, .thesis-title-note { color: var(--muted); font-size: .87rem; }
.date-range { font-size: .8rem; font-family: var(--mono); }
.page-content .entry-title { margin-bottom: 8px; font-size: 1.15rem; }
.supporting-note { padding-top: 10px; border-top: 1px solid var(--border); margin-top: 30px; }
.site-footer { border-top: 1px solid var(--border); padding: 28px; font-size: .8rem; text-align: center; color: var(--muted); }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.site-footer p { margin: 16px 0 0; }
.home-avatar { display: none; }
@media (min-width: 768px) { html { font-size: 18px; } }
@media (max-width: 1023px) {
  /* Navigation remains available when JavaScript is disabled. */
  body { padding-top: 0; }
  .masthead { position: static; }
  .masthead__inner-wrap { flex-wrap: wrap; padding-block: 16px; gap: 12px; }
  .masthead nav { width: 100%; }
  .nav-links { flex-wrap: wrap; gap: 0; }
  .nav-links a { padding: 8px 10px; }
  .js-nav body { padding-top: var(--masthead-h); }
  .js-nav .masthead { position: fixed; }
  .js-nav .masthead__inner-wrap { padding-block: 0; }
  .js-nav .nav-hamburger:not([hidden]) { display: block; }
  .js-nav .masthead nav { position: absolute; left: 0; right: 0; top: 100%; width: auto; }
  .js-nav .nav-links { display: none; padding: 12px 24px 20px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 8px 15px #35434a0d; max-height: calc(100dvh - var(--masthead-h)); overflow-y: auto; }
  .js-nav .nav-links.open { display: flex; flex-direction: column; align-items: stretch; }
  .js-nav .nav-links a { padding: 12px; }
  #main { grid-template-columns: 175px minmax(0,1fr); gap: 30px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card > img { height: 180px; border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 767px) {
  :root { --masthead-h: 68px; }
  .masthead__inner-wrap { padding-inline: 20px; }
  #main { display: block; margin-top: 28px; padding: 0 20px 42px; }
  .sidebar { display: none; }
  .home-avatar { display: block; width: 62px; height: 62px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; }
  .page-title { font-size: 1.85rem; margin-bottom: 20px; }
  .hero-role { font-size: 1rem; }
  .page-content .lede { font-size: 1rem; }
  .page-content .availability { font-size: .84rem; }
  .hero-actions { gap: 10px; margin-block: 22px 26px; }
  .hero-actions .btn { flex: 1 1 130px; padding-inline: 12px; }
  .home-section { margin-top: 28px; padding-bottom: 28px; }
  .section-heading { margin-bottom: 16px; }
  .featured-card > img { height: auto; max-height: 210px; aspect-ratio: 16 / 9; }
  .project-card .card-body { padding: 20px; }
  .project-grid { grid-template-columns: 1fr; }
  .detail-groups { grid-template-columns: 1fr; gap: 0; }
  .contact-panel { padding: 20px; }
  .link-separator { display: block; height: 8px; font-size: 0; }
  .contact-email { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Compact introductions and readable excerpts of the original research figures. */
.hero-secondary { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: .85rem; }
.hero-actions { margin-bottom: 14px; }
.cv-download { display: block; margin-top: 10px; text-align: center; font-size: .78rem; }
.project-card .card-purpose { font-weight: 650; margin-bottom: 10px; }
.project-status { color: var(--muted); font-size: .8rem; }
.project-card .project-status { font-size: .72rem; margin-bottom: 10px; }
.card-visual { background: var(--soft); padding: 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.thumbnail { position: relative; overflow: hidden; width: 100%; max-width: 240px; aspect-ratio: 1; }
.thumbnail img { position: absolute; max-width: none; height: auto; }
.thumbnail-navier-stokes img { width: 486.73%; left: -374.34%; top: -31.42%; }
.thumbnail-darcy img { width: 423.08%; left: -152.31%; top: -18.46%; }
.thumbnail-topology-optimization img { width: 100%; height: 100%; object-fit: contain; }
.project-card .thumbnail-caption { margin-top: 12px; text-align: center; color: var(--muted); font-size: .72rem; }
.architecture { list-style: none; padding: 0 !important; display: grid; gap: 12px; counter-reset: flow; }
.architecture li { margin: 0; padding: 18px 20px; border: 1px solid var(--border); border-left: 4px solid var(--link); border-radius: 6px; background: var(--soft); counter-increment: flow; }
.architecture strong::before { content: counter(flow) '. '; color: var(--link); }
.architecture span { display: block; font-size: .85rem; color: var(--muted); }
.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.evaluation-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.evaluation-table caption { text-align: left; font-weight: 650; margin-bottom: 12px; }
.evaluation-table th, .evaluation-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.evaluation-table thead { background: var(--soft); }
@media (max-width: 1023px) { .card-visual { border-right: 0; border-bottom: 1px solid var(--border); } }
@media (max-width: 767px) { .hero-actions { margin-bottom: 12px; } .thumbnail { max-width: 200px; } }

/* Image-led project browsing; full figures remain available in each case study. */
.project-preview { display: block; background: var(--soft); border-bottom: 1px solid var(--border); text-decoration: none; }
.project-preview img { display: block; width: 100%; height: 220px; object-fit: contain; padding: 14px; }
.project-preview span { display: block; padding: 0 14px 12px; font-size: .7rem; color: var(--muted); }
.project-preview:hover img, .gallery-item:hover img { background: #eaf2f3; }
.visual-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.gallery-item { overflow: hidden; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; }
.gallery-item img { width: 100%; height: 200px; display: block; object-fit: contain; background: var(--soft); padding: 12px; }
.gallery-item span { display: block; padding: 14px 16px; font-size: .85rem; font-weight: 650; }
.industry-visual { display: block; margin: 22px 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; text-decoration: none; }
.industry-visual img { display: block; width: 100%; }
.industry-visual span { display: block; padding: 12px 16px; font-size: .8rem; }
.research-preview { margin: 26px 0; }
.research-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: var(--soft); border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.research-preview figcaption { margin-top: 10px; font-size: .82rem; }
@media (max-width: 767px) { .visual-gallery { grid-template-columns: 1fr; } .gallery-item img { height: 230px; } .project-preview img { height: 210px; } }

.thumbnail-mixing, .thumbnail-lorenz96, .thumbnail-burgers-rom { max-width: none; }
.thumbnail-mixing { aspect-ratio: 1308 / 429; }
.thumbnail-lorenz96 { aspect-ratio: 975 / 675; }
.thumbnail-burgers-rom { aspect-ratio: 1680 / 480; }
.thumbnail-mixing img, .thumbnail-lorenz96 img, .thumbnail-burgers-rom img { width: 100%; height: 100%; object-fit: contain; }
.project-filters a[aria-current="true"] { background: var(--link); border-color: var(--link); color: white; }
.project-grid [hidden] { display: none; }
.project-count { color: var(--muted); font-size: .8rem; }
