html {
  scroll-behavior: smooth;
}

:root {
  --blue: #0b5ea8;
  --blue-dark: #07457d;
  --orange: #f28c18;
  --orange-dark: #d66f00;
  --surface: #e4e2dc;
  --surface-strong: #f7f6f3;
  --line: #cac6bd;
  --text: #14171a;
  --text-soft: #474e53;
  --text-muted: #7b8388;
}

body {
  margin: 0;
  padding-top: 60px;
  font-size: 17px;
  line-height: 1.5;
  font-family: "Newsreader", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--surface);
  background-image:
    linear-gradient(rgba(20, 23, 26, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 23, 26, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text-soft);
}


p {
  margin-bottom: 1.2em;
}

/** 
 * Navbar
*/

.navbar {
  width: 100%;
  background-color: rgba(252, 252, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 14px;
  line-height: normal;
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.nav-logo {
  font-size: 19px;
  font-weight: 700;
  color: var(--blue-dark);
  text-decoration: none;
}

.nav-empty-div{
  flex: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 17px;
  margin: 0;
  padding: 0;
  align-items: center;
  height: 100%;
}

.nav-links li {
  display: inline-flex;
}

.nav-links a {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-logo:hover {
  color: var(--orange-dark);
}

.nav-links li a {
  position: relative;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  background-color: var(--orange);
  width: 0;
  transition: width 0.45s ease;
}

body.dark-mode .nav-links li a::after {
  background-color: var(--orange);
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a.active::after {
  width: 100%;
}

/** 
 * Buttons
*/

/* Default (Light Mode) */
.arxiv-button {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--blue);
  background-color: transparent;
  border: 1px solid var(--blue);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 5px;
  margin-right: 4px;
}

/* Light Mode Hover */
.arxiv-button:hover {
  background-color: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}

/* Dark Mode */
body.dark-mode .arxiv-button {
  color: #ffb45c;
  border: 1px solid #ffb45c;
}

/* Dark Mode Hover */
body.dark-mode .arxiv-button:hover {
  background-color: #ffb45c;
  color: #071a2c;
}

/* Focus outline for accessibility */
.arxiv-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(11, 94, 168, 0.45);
}

body.dark-mode .arxiv-button:focus {
  box-shadow: 0 0 0 2px rgba(255, 180, 92, 0.45);
}

/** 
 * Mobile
*/

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-logo,
  .color-mode-toggle {
    display: none;
  }

  .nav-empty-div {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: var(--surface);
    padding-top: 60px;
    transition: left 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar {
    background-color: rgba(252, 252, 252, 0.98);
    backdrop-filter: none;
  }

  body.dark-mode .navbar {
    background-color: rgba(7, 26, 44, 0.98) !important;
    backdrop-filter: none !important;
  }

  body.dark-mode .nav-links {
    background-color: #071a2c;
  }

  .nav-links.show {
    left: 0;
    opacity: 0.9;
  }

  .nav-links li {
    width: 100%;
    margin: 15px 0px;
    padding-left: 20px;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 25px;
    /* adjust as needed */
    height: 25px;
    /* adjust as needed */
    cursor: pointer;
    z-index: 1002;
    /* ensure it stays on top */
  }

  /* Style for each bar */
  .nav-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--blue-dark);
    transition: all 0.3s ease;
  }

  /* When .open class is added, transform the bars into a cross */
  .nav-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .section-heading .link-icon {
    display: none;
  }

  body {
    padding-top: 48px;
  }

  .page-shell {
    padding: 22px 18px 40px;
  }

  .home-intro {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .home-copy .name {
    text-align: center;
  }

  .home-photo-link {
    order: -1;
  }

  .home-photo {
    width: 170px;
    height: 170px;
  }

  .social-row {
    justify-content: center;
  }

  .news-list p {
    display: block;
  }

  .resume-header {
    flex-direction: column;
  }

  .affiliation-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    text-align: left;
  }

  .affiliation-logo {
    width: 46px;
    height: 46px;
    padding: 6px;
  }

}

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

a:focus,
a:hover {
  color: var(--orange-dark);
  text-decoration: none;
}

body,
td,
th,
tr,
p,
a {
  font-size: inherit;
}

strong {
  color: var(--text);
  font-size: inherit;
  font-weight: 600;
}

h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 38px);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h1 {
  margin: 0 0 20px;
  color: var(--text);
  font-weight: 800;
  font-size: clamp(46px, 8vw, 84px);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  letter-spacing: -0.045em;
  line-height: 0.95;
}


.papertitle {
  color: var(--text);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(19px, 2.5vw, 23px);
  font-weight: 700;
  line-height: 1.15;
}

.name {
  padding-top: 20px;
  margin: 0;
  color: var(--text);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

span.highlight {
  background-color: #ffffd0;
}

.big-icon {
  font-size: 1.5em;
}

.page-shell {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  box-sizing: border-box;
}

.home-page {
  padding-top: 40px;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 34px;
  align-items: center;
  padding: 18px 0 26px;
}

.home-copy .name {
  text-align: center;
}

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

.home-copy > p:not(.name) {
  font-size: 18px;
  line-height: 1.5;
}

.tagline {
  color: var(--blue-dark);
  font-weight: 500;
}

.home-photo-link {
  display: block;
}

.home-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.social-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.news-section,
.page-section {
  margin-top: 24px;
}

.page-section > p {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-soft);
  font-size: 20px;
  line-height: 1.5;
}

.page-section > h1,
.research-page .page-section:first-child > p,
.projects-page .page-section:first-child > p {
  text-align: center;
}

.news-section h2,
.page-section h2 {
  margin-bottom: 14px;
}

.news-list {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.news-list p {
  display: block;
  margin: 13px 0;
  font-size: 17px;
  line-height: 1.55;
}

.news-date {
  display: inline;
  color: var(--orange-dark);
  font-weight: 600;
  white-space: nowrap;
  margin-right: 6px;
}

.blog-section {
  margin-top: 42px;
}

.blog-section h2 {
  margin-bottom: 14px;
}

.blog-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.blog-card {
  display: block;
  padding: 25px 27px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.blog-card:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--orange);
  transform: translateY(-3px);
}

.blog-card-label,
.blog-meta,
.blog-tags {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-card-label { color: var(--orange-dark); }

.blog-card h3 {
  margin: 12px 0 9px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(23px, 4vw, 31px);
  line-height: 1.12;
}

.blog-card p {
  max-width: 60ch;
  margin: 0 0 18px;
  color: #4e5d6d;
  line-height: 1.55;
}

.blog-meta { color: #5e6b79; letter-spacing: 0.03em; }

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.blog-tags span {
  padding: 5px 8px;
  color: #07528f;
  background: #eef7ff;
  border: 1px solid #cbe1f2;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.site-footer {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: calc(100% - 40px);
  max-width: 1100px;
  margin: 18px auto 36px;
  padding: 0 20px;
  overflow-x: auto;
  white-space: nowrap;
  color: #7b8388;
  box-sizing: border-box;
}

.site-footer span,
.site-footer a {
  font-size: 14px;
}

.site-footer span {
  font-weight: 600;
  color: var(--blue-dark);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-footer i {
  color: var(--orange-dark);
}

@media (max-width: 1000px) {
  .site-footer {
    justify-content: flex-start;
  }
}

.about-story p {
  line-height: 1.58;
}

.about-icon-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 20px;
}

.about-icon-list p {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin: 0;
}

.about-icon-list i,
.about-list i,
.about-social-row i {
  color: var(--orange-dark);
}

.about-list {
  margin: 0 0 1.2em 1.2em;
  padding: 0;
  list-style: none;
}

.about-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  margin: 0.45em 0;
  line-height: 1.5;
}

.about-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.about-social-row a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 500;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.affiliation-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 14px 0;
}

.affiliation-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 7px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(11, 94, 168, 0.12);
}

.education-item {
  display: flex;
  align-items: baseline;
  margin-bottom: -10px;
}

.bullet-icon {
  font-size: 1.2em;
  margin-right: 8px;
  flex-shrink: 0;
}

/** 
 * Dark mode styles
*/

body.dark-mode {
  --text: #dbe7f3;
  --text-soft: #aec5dc;
  --text-muted: #82a4c2;
  background-color: #071a2c;
  background-image:
    linear-gradient(rgba(219, 231, 243, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 231, 243, 0.035) 1px, transparent 1px);
  color: var(--text-soft);
}

body.dark-mode a {
  color: #6fb7ff;
}

body.dark-mode a:hover {
  color: #ffb45c;
}

body.dark-mode .tagline,
body.dark-mode .news-date,
body.dark-mode .site-footer {
  color: #ffbf73;
}

body.dark-mode .site-footer span {
  color: #dbe7f3;
}

body.dark-mode .site-footer i {
  color: #ffbf73;
}

body.dark-mode .news-list {
  border-top-color: #173b5c;
}

body.dark-mode .affiliation-logo {
  background: #ffffff;
  border-color: #2c5f8d;
  box-shadow: 0 2px 12px rgba(255, 180, 92, 0.18);
}

body.dark-mode .navbar {
  background-color: rgba(7, 26, 44, 0.9);
  backdrop-filter: blur(10px);
  border-bottom-color: #173b5c;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .nav-links li a::after {
  background-color: #ffb45c;
  opacity: 0.9;
}

/* Dark/Light Mode Toggler Styles 
  * Credit: https://janessagarrow.com/blog/css-dark-mode-toggle/
*/
.color-mode-toggle {
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  background: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.color-mode-toggle .sun {
  width: 50%;
  height: 50%;
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6) rotate(0deg);
  transition: transform 0.55s ease-in, opacity 0.2s ease-in 0.1s;
  background: radial-gradient(circle,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0) 50%,
    #333 50%
  );
}

.color-mode-toggle .sun:before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    #333 30%,
    rgba(0, 0, 0, 0) 31%,
    rgba(0, 0, 0, 0) 50%,
    #333 50%
  );
  transform: rotate(45deg);
}

.color-mode-toggle .sun.visible {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) rotate(180deg);
  transition: transform 0.45s ease-in, opacity 0.2s ease-in 0.1s;
}

.color-mode-toggle .moon {
  width: 50%;
  height: 50%;
  pointer-events: none;
  position: absolute;
  left: -2.5%;
  top: 18.75%;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 50%;
  box-shadow: 9px 3px 0px 0px var(--orange);
  opacity: 0;
  transform: scale(0.3) rotate(65deg);
  transition: transform 0.45s ease-in, opacity 0.2s ease-in 0.1s;
}

.color-mode-toggle .moon::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 10px;
  right: -10px;
  bottom: -5px;
  background: transparent;
  /* Ensure the pseudo-element receives pointer events */
  pointer-events: auto;
}

.color-mode-toggle .moon:hover {
  box-shadow: 9px 3px 0px 0px var(--orange-dark);
}

.color-mode-toggle .moon.visible {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition: transform 0.45s ease-in, opacity 0.2s ease-in 0.1s;
}

/* Smooth transition for background and text colors */
body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.navbar {
  transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

a {
  transition: color 0.3s ease;
}

/** 
 * Name and pronunciation
*/

.name-part {
  position: relative;
  cursor: pointer;
  border: none;
  background-color: transparent;
  padding: 0;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

.name-part .tooltip {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 20px;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.4s;
  white-space: nowrap;
}

.name-part:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/** 
 * Selecting text
*/

body.dark-mode ::selection {
  background: #f28c18;
  color: #ffffff;
}

body.dark-mode ::-moz-selection {
  background: #f28c18;
  color: #ffffff;
}

img {
  user-select: none;
  -webkit-user-select: none;
  /* For Safari */
  -moz-user-select: none;
  /* For Firefox */
  -ms-user-select: none;
  /* For IE/Edge */
}

.research-media {
  width: 180px;
  height: 135px;
  object-fit: contain;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid var(--line);
  transition: opacity 0.3s ease;
}

/* Research Cards */
.research-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  background-color: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 48px 27px 25px;
  margin: 16px 0;
  box-shadow: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.research-card::before {
  position: absolute;
  top: 20px;
  left: 27px;
  color: var(--orange-dark);
  content: "Publication";
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

body.projects-page .research-card::before {
  content: "Project";
}

.research-card:hover {
  background-color: #ffffff;
  border-color: var(--orange);
  box-shadow: none;
  transform: translateY(-3px);
}

.research-card-image {
  flex-shrink: 0;
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.research-card-content {
  flex: 1;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.35;
}

.research-card-content p:last-child {
  margin-bottom: 0;
}

.project-points {
  margin: 10px 0 12px 1.1em;
  padding: 0;
}

.project-points li {
  margin: 6px 0;
  line-height: 1.5;
}

/* Research card description toggle */
.research-details {
  display: inline;
}

.research-details summary {
  list-style: none;
  display: inline-flex;
  cursor: pointer;
}

.research-details summary::-webkit-details-marker {
  display: none;
}

.research-abstract {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.4s ease,
              margin-top 0.4s ease;
  margin-top: 0;
}

.research-abstract > p {
  margin: 0;
}

.abstract-toggle {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: #666;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 5px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.abstract-toggle:hover {
  background-color: var(--surface);
  border-color: var(--line);
}

.abstract-toggle i {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.citation-preview {
  position: fixed;
  z-index: 1300;
  box-sizing: border-box;
  max-height: min(360px, 62vh);
  padding: 14px 16px 16px;
  overflow: hidden;
  color: #dce4e9;
  background: #0f1317;
  border: 1px solid #39454e;
  border-radius: 2px;
  box-shadow: 0 18px 45px rgba(10, 14, 18, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 130ms ease, transform 130ms ease;
}

.citation-preview.visible {
  opacity: 1;
  transform: translateY(0);
}

.citation-preview-label {
  display: block;
  margin-bottom: 9px;
  color: #3fd1a0;
  font: 600 10px/1.2 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.citation-preview pre {
  max-height: calc(min(360px, 62vh) - 48px);
  margin: 0;
  overflow: auto;
  color: #dce4e9;
  font: 11px/1.55 "IBM Plex Mono", ui-monospace, monospace;
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  .citation-preview { transition: none; }
}

.research-details[open] .abstract-toggle i {
  transform: rotate(180deg);
}

body.dark-mode .abstract-toggle {
  color: #aaa;
  border-color: #444;
}

body.dark-mode .abstract-toggle:hover {
  background-color: #2a2a2a;
  border-color: #555;
}

body.dark-mode .research-card {
  background-color: #0c2135;
  border-color: #1d4669;
  box-shadow: none;
}

body.dark-mode .research-card:hover {
  background-color: #102b43;
  border-color: #ffb45c;
  box-shadow: none;
}

body.dark-mode .papertitle {
  color: #dbe7f3;
}

body.dark-mode .research-card::before {
  color: #ffbf73;
}

@media (max-width: 768px) {
  .research-card {
    flex-direction: column;
    align-items: stretch;
    padding: 48px 20px 22px;
    text-align: left;
  }

  .research-card::before { left: 20px; }
  
  .research-card-image {
    margin-right: 0;
    margin-bottom: 16px;
    align-self: stretch;
  }

  .research-media {
    width: 100%;
    max-width: 280px;
    height: 170px;
  }
}


/**
* Section toast
*/

/* Section heading container */
.section-heading {
  position: relative;
  display: inline-block;
}

/* Hidden link icon that appears on hover */
.section-heading .link-icon {
  opacity: 0;
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  color: #666;
  transition: opacity 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  padding: 5px;
}

.section-heading:hover .link-icon {
  opacity: 1;
}

.section-heading .link-icon:hover {
  color: var(--orange-dark);
}

body.dark-mode .section-heading .link-icon {
  color: #aac8e4;
}

body.dark-mode .section-heading .link-icon:hover {
  color: #ffb45c;
}

/* Make the heading itself clickable */
.section-heading h2 {
  cursor: pointer;
  margin: 0;
  /* Remove individual transition - use global body transition instead */
}

.section-heading h2:hover {
  color: var(--orange-dark);
}

body.dark-mode .section-heading h2:hover {
  color: #ffb45c;
}

/* Toast notification for copy feedback */
.copy-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background-color: #333;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.dark-mode .copy-toast {
  background-color: #d3d3d3;
  color: #071a2c;
}

body.dark-mode .blog-card {
  color: #dbe7f3;
  background: #0c2135;
  border-color: #1d4669;
}

body.dark-mode .blog-card:hover {
  color: #dbe7f3;
  background: #102b43;
  border-color: #ffb45c;
}

body.dark-mode .blog-card-label { color: #ffbf73; }
body.dark-mode .blog-card p,
body.dark-mode .blog-meta { color: #aec5dc; }
body.dark-mode .blog-tags span {
  color: #a9d7ff;
  background: #102d47;
  border-color: #25587f;
}

/* Keep the portrait and introduction in a single, readable column on phones and tablets. */
@media (max-width: 1100px) {
  .home-intro {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    gap: 22px;
  }

  .home-copy { min-width: 0; }
  .home-copy .name { text-align: center; }

  .home-photo-link {
    order: -1;
    width: 100%;
    text-align: center;
  }

  .home-photo {
    width: min(190px, 55vw);
    height: min(190px, 55vw);
    max-width: 100%;
  }
}

@media print {
  body {
    padding-top: 0;
    background: #fff;
    color: #000;
  }

  .navbar,
  #particles-js,
  .content-wrapper,
  .site-footer,
  .resume-header .arxiv-button {
    display: none;
  }

  .page-shell {
    max-width: none;
    padding: 0;
  }
}
