:root {
  --ink: #10283a;
  --ink-deep: #061c2b;
  --blue: #126ab4;
  --cyan: #31b7d8;
  --gold: #caa33e;
  --muted: #60768a;
  --line: #dce5ec;
  --paper: #ffffff;
  --wash: #f3f7fa;
  --radius: 24px;
  --shadow: 0 26px 70px rgba(8, 39, 61, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }
.skip-link { position: fixed; top: -60px; left: 18px; z-index: 999; padding: 10px 16px; background: var(--paper); color: var(--ink-deep); border-radius: 8px; }
.skip-link:focus { top: 18px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #eaf5fb;
  background: rgba(6, 28, 43, .94);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { font-size: 16px; letter-spacing: .01em; }
.brand small { margin-top: 5px; color: #91adbf; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { color: #dce9f1; text-decoration: none; font-size: 14px; font-weight: 650; }
nav a:hover, nav a:focus-visible { color: #fff; }
.menu-button { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; color: #fff; background: transparent; cursor: pointer; }
.menu-button > span:not(.sr-only) { display: block; width: 22px; height: 2px; margin: 4px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease; }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 26%, rgba(49, 183, 216, .18), transparent 27%),
    linear-gradient(135deg, var(--ink-deep) 0%, #0c2d43 58%, #0a3f58 100%);
}
.hero::after { content: ""; position: absolute; width: 620px; height: 620px; right: -250px; bottom: -380px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.hero-grid { position: relative; z-index: 1; min-height: 700px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 80px; padding-block: 88px; }
.eyebrow { margin: 0 0 24px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.hero .eyebrow { color: #8cdcef; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 28px; font-size: clamp(54px, 7vw, 92px); line-height: .98; letter-spacing: -.055em; }
h1 span { color: #9fddea; font-weight: 530; }
.hero-lead { max-width: 720px; margin-bottom: 34px; color: #bdd0dc; font-size: clamp(20px, 2vw, 25px); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: #fff; color: var(--ink-deep); }
.button-secondary { color: #fff; border: 1px solid rgba(255,255,255,.28); }
.button-secondary:hover { background: rgba(255,255,255,.08); }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.hero-links a { color: #d9e8f0; font-size: 13px; font-weight: 700; text-decoration-color: rgba(255,255,255,.32); text-underline-offset: 5px; }

.portrait-wrap { justify-self: end; width: min(100%, 390px); }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: .86; border: 1px solid rgba(255,255,255,.17); border-radius: 32px 32px 150px 32px; box-shadow: var(--shadow); background: #d7e1e6; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: saturate(.86) contrast(1.03); }
.portrait-note { width: calc(100% - 36px); margin: -42px 0 0 -38px; position: relative; z-index: 2; padding: 19px 22px; color: var(--ink-deep); background: #fff; border-radius: 16px; box-shadow: 0 16px 44px rgba(0,0,0,.18); }
.portrait-note span, .portrait-note strong { display: block; }
.portrait-note span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.portrait-note strong { margin-top: 4px; font-size: 15px; }

.affiliation-strip { color: #c9d9e2; background: #092233; border-top: 1px solid rgba(255,255,255,.08); }
.affiliation-grid { min-height: 82px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.affiliation-grid > span, .affiliation-grid > a { padding: 8px 24px; border-right: 1px solid rgba(255,255,255,.1); font-size: 12px; font-weight: 750; letter-spacing: .09em; text-align: center; text-decoration: none; text-transform: uppercase; }
.affiliation-grid > span:first-child { border-left: 1px solid rgba(255,255,255,.1); }
.affiliation-grid > a:hover { color: #fff; }

.section { padding-block: 112px; }
.section-light { background: var(--wash); }
h2 { max-width: 820px; margin-bottom: 50px; color: var(--ink-deep); font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -.04em; }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.role-card { min-height: 350px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.role-card-dark { color: #eaf4f8; background: var(--ink-deep); border-color: var(--ink-deep); }
.role-card-accent { background: #e6f4f7; border-color: #cae6ec; }
.role-index { color: #7b98ab; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.role-org { margin: 82px 0 12px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.institution-line { min-height: 45px; display: flex; align-items: center; gap: 13px; margin: 58px 0 12px; }
.institution-line img { flex: 0 0 auto; object-fit: contain; }
.institution-logo--mesc { width: 44px; height: 44px; }
.institution-logo--uvic { width: 64px; height: 25px; }
.institution-logo--capital { width: 30px; height: 45px; }
.institution-line .role-org { margin: 0; }
.role-card-dark .role-org { color: #9fddea; }
.role-card h3 { margin-bottom: 16px; font-size: 26px; line-height: 1.15; letter-spacing: -.03em; }
.role-card p:last-child { color: var(--muted); font-size: 15px; }
.role-card-dark p:last-child { color: #adc2ce; }

.research-focus { color: #eaf4f8; background: var(--ink-deep); }
.research-focus h2 { color: #fff; }
.split-intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 86px; align-items: start; }
.intro-copy > p { color: #b7cad5; font-size: 20px; }
.topic-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.topic-list span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #dceaf1; font-size: 12px; font-weight: 700; }

.publications-section { background: #fff; }
.section-heading-row { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.section-heading-row h2 { margin-bottom: 0; }
.text-link { margin-bottom: 10px; color: var(--blue); font-size: 14px; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.selected-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 58px 0 76px; }
.selected-card { min-height: 320px; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--wash); }
.selected-card:nth-child(2) { color: #e8f4f8; background: var(--ink-deep); border-color: var(--ink-deep); }
.publication-meta { margin-bottom: 64px; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.selected-card:nth-child(2) .publication-meta { color: #8bd8e9; }
.selected-card h3 { margin-bottom: 13px; font-size: 26px; line-height: 1.15; letter-spacing: -.03em; }
.selected-card > p:not(.publication-meta):not(.authors) { color: var(--muted); font-size: 15px; }
.selected-card:nth-child(2) > p:not(.publication-meta):not(.authors) { color: #aec5d1; }
.authors { margin: auto 0 0; color: #6f8495; font-size: 12px; font-weight: 700; }

.publication-archive { border-top: 1px solid var(--line); }
.publication-archive details { border-bottom: 1px solid var(--line); }
.publication-archive summary { min-height: 80px; display: grid; grid-template-columns: minmax(0, 1fr) 150px 32px; align-items: center; gap: 24px; padding: 20px 4px; color: var(--ink-deep); cursor: pointer; list-style: none; font-size: 20px; font-weight: 780; }
.publication-archive summary::-webkit-details-marker { display: none; }
.publication-archive summary span:last-child { min-width: 120px; justify-self: center; padding: 7px 13px; color: #607b8e; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.publication-archive summary::after { content: "+"; display: grid; place-items: center; width: 30px; height: 30px; justify-self: end; color: var(--blue); border: 1px solid #b9cedb; border-radius: 50%; font-size: 18px; font-weight: 500; }
.publication-archive details[open] summary::after { content: "−"; }
.publication-list { margin: 0; padding: 6px 28px 38px 30px; color: #425b6e; }
.publication-list li { padding: 13px 0 13px 12px; border-bottom: 1px solid #edf2f5; }
.publication-list li:last-child { border-bottom: 0; }
.publication-list em { color: var(--ink); }
.linked-list a { color: var(--blue); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.dissertation-list { list-style: none; padding-left: 4px; }
.dissertation-list li { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-left: 0; }
.dissertation-list a { flex: 0 0 auto; padding: 8px 13px; color: var(--blue); border: 1px solid #b9cedb; border-radius: 999px; font-size: 12px; font-weight: 800; text-decoration: none; }

.experience-section { background: var(--wash); }
.experience-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 100px; }
.experience-intro { position: sticky; top: 124px; align-self: start; }
.experience-intro h2 { margin-bottom: 28px; font-size: clamp(36px, 4.5vw, 54px); }
.experience-intro > p:last-child { max-width: 520px; color: var(--muted); }
.timeline { margin: 0; padding: 0; list-style: none; border-top: 1px solid #ccd9e1; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 27px 0; border-bottom: 1px solid #ccd9e1; }
.timeline > li > span { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.timeline h3, .degree-list h3 { margin-bottom: 5px; font-size: 21px; }
.timeline p, .degree-list p { margin: 0; color: var(--muted); font-size: 14px; }

.education-section { background: #fff; }
.education-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; }
.degree-list { border-top: 1px solid var(--line); }
.degree-list article { display: grid; grid-template-columns: 82px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.degree-list article > span { color: var(--blue); font-size: 12px; font-weight: 850; }

.teaching-band { padding-block: 88px; color: #e9f5f8; background: #0a3549; }
.teaching-band h2 { margin-bottom: 0; color: #fff; }
.teaching-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
.teaching-links { display: grid; gap: 12px; }
.teaching-links a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; text-decoration: none; }
.teaching-links a:hover { background: rgba(255,255,255,.06); }
.teaching-links span { color: #9fc0cf; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.teaching-links strong { font-size: 14px; }

.site-footer { padding: 86px 0 34px; color: #b8cbd7; background: var(--ink-deep); }
.contact-panel { display: grid; grid-template-columns: 1fr auto; gap: 70px; align-items: end; padding-bottom: 76px; }
.contact-panel h2 { margin-bottom: 0; color: #fff; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.footer-bottom { display: grid; grid-template-columns: 1fr auto auto; gap: 38px; align-items: center; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand p { margin: 0; font-size: 12px; line-height: 1.5; }
.footer-bottom ul { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.footer-bottom a { color: #dceaf1; font-size: 12px; font-weight: 700; text-decoration: none; }
.preview-status { margin: 0; padding: 7px 11px; color: #89abbb; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

:focus-visible { outline: 3px solid #65c6df; outline-offset: 4px; }

@media (max-width: 900px) {
  .menu-button { display: block; }
  nav { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 22px 22px; background: var(--ink-deep); border-bottom: 1px solid rgba(255,255,255,.1); }
  nav a { padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-open nav { display: flex; }
  .nav-open .menu-button span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .menu-button span:nth-child(2) { opacity: 0; }
  .nav-open .menu-button span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 60px; }
  .portrait-wrap { justify-self: start; }
  .role-grid { grid-template-columns: 1fr; }
  .role-card { min-height: 280px; }
  .role-org { margin-top: 54px; }
  .affiliation-grid { grid-template-columns: repeat(2, 1fr); padding-block: 12px; }
  .affiliation-grid > span, .affiliation-grid > a { min-height: 48px; display: grid; place-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
  .split-intro, .experience-grid, .education-grid, .teaching-grid { grid-template-columns: 1fr; gap: 48px; }
  .section-heading-row { grid-template-columns: 1fr; align-items: start; }
  .selected-grid { grid-template-columns: 1fr; }
  .selected-card { min-height: 270px; }
  .publication-meta { margin-bottom: 42px; }
  .experience-intro { position: static; }
  .contact-panel { grid-template-columns: 1fr; align-items: start; }
  .contact-actions { justify-content: flex-start; }
  .footer-bottom { grid-template-columns: 1fr; justify-items: start; }
}

@media (max-width: 580px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 68px; }
  .brand img { width: 40px; height: 40px; }
  .hero-grid { padding-block: 64px 78px; }
  h1 { font-size: 48px; }
  .hero-lead { font-size: 19px; }
  .portrait-note { margin-left: 0; width: calc(100% - 18px); }
  .section { padding-block: 78px; }
  .role-card { padding: 26px; }
  .affiliation-grid { grid-template-columns: 1fr; }
  .affiliation-grid > span, .affiliation-grid > span:first-child, .affiliation-grid > a { border-left: 0; border-right: 0; }
  .selected-grid { margin-top: 42px; }
  .publication-archive summary { font-size: 17px; }
  .publication-archive summary span:last-child { display: none; }
  .publication-list { padding-left: 22px; padding-right: 0; font-size: 15px; }
  .dissertation-list li { align-items: flex-start; flex-direction: column; }
  .timeline li { grid-template-columns: 88px 1fr; }
  .degree-list article { grid-template-columns: 64px 1fr; }
  .contact-actions { flex-direction: column; align-items: stretch; }
  .footer-bottom ul { flex-wrap: wrap; }
}
