:root {
  --navy: #10233f;
  --navy-light: #1c3c63;
  --cyan: #087ea4;
  --violet: #635bba;
  --gold: #b7791f;
  --pink: #c24170;
  --page: #f6f8fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #56657a;
  --border: #d9e1eb;
  --shadow: 0 14px 38px rgba(16, 35, 63, 0.08);
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #dbe3ed;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(16, 35, 63, 0.05);
  backdrop-filter: blur(14px);
}

.nav-container {
  width: min(var(--content-width), 90%);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  flex-shrink: 0;
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.site-brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  white-space: nowrap;
}

.site-nav a {
  padding: 7px 12px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  color: #4d5c72;
  background: #ffffff;
  font-size: 0.84rem;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.site-nav a:nth-child(n + 4) {
  border-color: rgba(8, 126, 164, 0.45);
  border-radius: 999px;
  color: #24506d;
}

.site-nav a:hover {
  border-color: rgba(8, 126, 164, 0.6);
  color: var(--cyan);
  background: #eef8fb;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--navy);
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.site-main {
  min-height: calc(100vh - 145px);
}

.page-shell,
.article-shell {
  width: min(var(--content-width), 90%);
  margin: 0 auto;
  padding: 52px 0 64px;
}

.page-header,
.article-header {
  max-width: 900px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.2;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-top: 2.2rem;
  font-size: 1.65rem;
}

h3 {
  margin-top: 1.7rem;
  font-size: 1.2rem;
}

.page-intro {
  max-width: 850px;
  margin: 18px 0 0;
  color: #40516a;
  font-size: 1.05rem;
}

.page-content,
.article-content {
  max-width: 900px;
}

.page-content > :first-child,
.article-content > :first-child {
  margin-top: 0;
}

.page-content p,
.article-content p {
  margin: 0 0 1.1rem;
}

.page-content ul,
.page-content ol,
.article-content ul,
.article-content ol {
  padding-left: 1.4rem;
}

.card,
.page-content > section,
.article-content > section {
  margin: 22px 0;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

blockquote {
  margin: 1.5rem 0;
  padding: 14px 20px;
  border-left: 4px solid var(--cyan);
  background: #eef8fb;
  color: #334155;
}

code {
  padding: 0.12rem 0.34rem;
  border-radius: 5px;
  background: #eaf0f6;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.92em;
}

pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 14px;
  color: #f7fbff;
  background: var(--navy);
}

pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

figure {
  margin: 1.8rem 0;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  background: var(--card);
}

th,
td {
  padding: 11px 13px;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--navy);
  background: #eef3f8;
}

.article-back-link {
  margin-top: 38px;
  font-weight: 800;
}

.site-footer {
  padding: 22px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: #ffffff;
  font-size: 0.85rem;
}

.footer-container {
  width: min(var(--content-width), 90%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-container p {
  margin: 0;
}

.footer-container a {
  color: #315878;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

::selection {
  color: #ffffff;
  background: var(--cyan);
}

@media (max-width: 900px) {
  .nav-container {
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 6px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .site-nav a:nth-child(n + 4) {
    border-radius: 10px;
    text-align: center;
  }

  .footer-container {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .article-shell {
    width: min(92%, var(--content-width));
    padding-top: 38px;
  }

  h1 {
    font-size: 2.75rem;
  }

  .card,
  .page-content > section,
  .article-content > section {
    padding: 20px;
  }
}

/* Homepage */
.home-hero {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: center;
  gap: 60px;
  width: min(1120px, 90%);
  margin: 0 auto;
  padding: 55px 0 48px;
}

.home-portrait {
  width: 290px;
  height: 350px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 18px 45px rgba(16, 35, 63, 0.13);
}

.home-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.home-introduction h1 {
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.home-introduction > p {
  max-width: 800px;
}

.home-role {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.home-role strong {
  color: var(--navy);
}

.primary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--cyan);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(8, 126, 164, 0.18);
}

.primary-button:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 11px 26px rgba(8, 126, 164, 0.2);
}

.home-topics {
  width: min(1120px, 90%);
  margin: 0 auto 48px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 38px rgba(16, 35, 63, 0.07);
}

.home-topics-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.home-topics-heading h2 {
  margin: 0;
}

.home-topics-heading a,
.topic-card span {
  color: var(--cyan);
  font-weight: 800;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.topic-card {
  min-height: 135px;
  padding: 18px 18px 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 0 16px 16px 0;
  background: #f9fbfd;
  color: var(--text);
}

.topic-card:hover {
  border-color: rgba(8, 126, 164, 0.45);
  background: #f1f8fb;
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(16, 35, 63, 0.1);
}

.topic-card h3 {
  margin: 0 0 6px;
}

.topic-card p {
  margin: 0;
  color: var(--muted);
}

.topic-card span {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
}

.topic-violet {
  border-left-color: #635bba;
}

.topic-gold {
  border-left-color: #b7791f;
}

.topic-pink {
  border-left-color: #c24170;
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .home-portrait {
    width: min(290px, 100%);
    height: 300px;
    margin: 0 auto;
  }

  .home-introduction {
    text-align: center;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .home-topics-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Research Projects page */
.projects-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.projects-section > h2 {
  margin-bottom: 20px;
}

.projects-list {
  display: grid;
  gap: 22px;
}

.project-card {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(16, 35, 63, 0.065);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--cyan);
  content: "";
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 126, 164, 0.42);
  box-shadow: 0 16px 34px rgba(16, 35, 63, 0.1);
}

.project-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.3;
}

.project-card p {
  max-width: 930px;
  color: var(--muted);
}

.project-number {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.project-role {
  margin-top: 15px;
  color: #294765 !important;
  font-size: 0.88rem;
  font-weight: 700;
}

.project-violet::before {
  background: #635bba;
}

.project-violet .project-number {
  color: #635bba;
}

.project-gold::before {
  background: #b7791f;
}

.project-gold .project-number {
  color: #b7791f;
}

.future-note {
  margin-top: 30px;
  padding: 20px 24px;
  border: 1px dashed rgba(8, 126, 164, 0.34);
  border-radius: 18px;
  color: var(--muted);
  background: #eef8fb;
}

.future-note strong {
  color: var(--navy);
}

.secondary-button {
  display: inline-flex;
  margin-top: 14px;
  padding: 9px 16px;
  border: 1px solid rgba(8, 126, 164, 0.45);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 800;
  background: #ffffff;
}

.secondary-button:hover {
  color: var(--cyan);
  background: #eef8fb;
  transform: translateY(-2px);
}

@media (max-width: 650px) {
  .project-card {
    padding: 24px 22px;
  }
}

.page-content > .projects-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Publications and Conferences page */
.section-heading {
  margin: 44px 0 20px;
}

.page-content > .conference-list {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.conference-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.06);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.conference-card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 126, 164, 0.42);
  box-shadow: 0 15px 32px rgba(16, 35, 63, 0.1);
}

.conference-card h3 {
  margin: 0 0 7px;
  font-size: 1.12rem;
  line-height: 1.4;
}

.conference-year {
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 900;
}

.conference-authors {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.conference-authors strong {
  color: var(--navy);
}

.conference-venue {
  margin: 10px 0 0;
  color: #3f5168;
  font-size: 0.9rem;
  font-style: italic;
}

.conference-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--cyan);
  font-size: 0.83rem;
  font-weight: 800;
}

@media (max-width: 650px) {
  .conference-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* CV page */
.cv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.cv-actions .primary-button,
.cv-actions .secondary-button {
  margin-top: 0;
}

.cv-viewer {
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(16, 35, 63, 0.07);
}

.cv-viewer object {
  display: block;
  width: 100%;
  height: 900px;
  border: 0;
  border-radius: 12px;
}

@media (max-width: 650px) {
  .cv-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cv-actions a {
    width: 100%;
  }

  .cv-viewer object {
    height: 650px;
  }
}

/* Research and learning topic pages */
.topic-articles {
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(16, 35, 63, 0.07);
}

.topic-articles > h2 {
  margin: 0 0 22px;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-card {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 18px;
  background: #f8fbff;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 35, 63, 0.08);
}

.article-card h3 {
  margin: 4px 0 10px;
  font-size: 1.25rem;
  line-height: 1.35;
}

.article-card h3 a {
  color: var(--navy);
}

.article-card h3 a:hover {
  color: var(--cyan);
}

.article-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.article-date {
  color: var(--cyan) !important;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-link {
  display: inline-flex;
  margin-top: 4px;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 800;
}

.topic-empty {
  padding: 26px;
  border: 1px dashed #8dcce4;
  border-radius: 18px;
  background: #eef8fb;
}

.topic-empty h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.topic-empty p {
  margin: 0;
  color: var(--muted);
}

.topic-articles + p {
  margin-top: 24px;
}

@media (max-width: 650px) {
  .topic-articles {
    margin-top: 28px;
    padding: 22px;
  }

  .article-card,
  .topic-empty {
    padding: 20px;
  }
}

/* Shared interactive quiz */
.quiz {
  margin: 28px 0;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fbff;
}

.quiz-question {
  margin: 0 0 18px;
  color: var(--navy);
  font-weight: 800;
}

.quiz-choices {
  display: grid;
  gap: 10px;
}

.quiz-choices button {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #a9c9da;
  border-radius: 12px;
  background: var(--card);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.quiz-choices button:hover {
  border-color: var(--cyan);
  background: #eef8fb;
}

.quiz-choices button.is-correct {
  border-color: #238b57;
  background: #e9f8ef;
  color: #145c39;
}

.quiz-choices button.is-incorrect {
  border-color: #c44b5e;
  background: #fff0f2;
  color: #8e2638;
}

.quiz-feedback {
  min-height: 1.5em;
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 650px) {
  .quiz {
    padding: 20px;
  }
}

/* Downloadable learning resources */
.resource-section,
.article-quiz-section {
  margin-top: 40px;
}

.resource-section > h2,
.article-quiz-section > h2 {
  margin-bottom: 20px;
  color: var(--navy);
}

.resource-list {
  display: grid;
  gap: 16px;
}

.resource-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(16, 35, 63, 0.06);
}

.resource-type {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f7fb;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-details h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.2rem;
}

.resource-details > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.resource-actions .primary-button,
.resource-actions .secondary-button {
  margin-top: 0;
  white-space: nowrap;
}

.article-quiz-section .quiz {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .resource-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .resource-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 650px) {
  .resource-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-actions a {
    width: 100%;
  }
}


/* Photography and videos page */

.hobby-section {
  margin-bottom: 48px;
}

.hobby-section > p {
  max-width: 850px;
  margin-bottom: 28px;
}

.hobby-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.hobby-video-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d6e1ee;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(7, 21, 47, 0.06);
}

.hobby-video-placeholder {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 28px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 21, 47, 0.94), rgba(8, 145, 178, 0.86));
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.hobby-video-content {
  padding: 26px;
}

.hobby-video-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.hobby-video-content p {
  margin-bottom: 22px;
}

.hobby-video-content .primary-button {
  display: inline-flex;
}

@media (max-width: 760px) {
  .hobby-video-grid {
    grid-template-columns: 1fr;
  }

  .hobby-video-placeholder {
    min-height: 190px;
  }

  .hobby-video-content {
    padding: 22px;
  }
}

.hobby-video-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #07152f;
  transition: transform 0.25s ease;
}

.hobby-video-card > a {
  display: block;
  overflow: hidden;
}

.hobby-video-card > a:hover .hobby-video-thumbnail {
  transform: scale(1.03);
}