/* — Basic reset — */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* — Base body styles — */
body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f7fa;
}

/* — Header / Nav — */
header {
  background-color: #333;
  width: 100%;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
}
.site-title {
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin-right: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}
nav {
  flex: 1;
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}
nav a {
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.3s ease;
}
nav a:hover {
  color: #f4b400;
}

/* — Main body container — */
.home-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "profile story";
  gap: 2rem;
  width: min(1200px, calc(100% - 2rem));
  margin: 2rem auto 1.5rem;
  padding: 0;
}
.profile-card,
.content-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}
.profile-card {
  grid-area: profile;
  padding: 1.5rem;
  align-self: stretch;
}
.profile-photo {
  width: 100%;
  max-width: 240px;
  display: block;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.profile-links {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.6rem;
}
.profile-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #f8fafc;
  text-decoration: none;
  color: #0f766e;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.profile-link:hover {
  background: #ecfeff;
  border-color: #99f6e4;
  transform: translateY(-1px);
}
.profile-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px;
}
.content-card {
  grid-area: story;
  padding: 1.75rem 1.9rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f766e;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.content-card h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.45rem;
  margin: 1.1rem 0 0.55rem;
  text-transform: uppercase;
  color: #0f172a;
}
.content-card p {
  color: #334155;
  font-size: 1rem;
}
.content-card p + h2 {
  margin-top: 1.5rem;
}

/* — Contact & Skills in sidebar — */
.section-back-to-top {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 1.5rem;
  padding: 0 2rem;
}

.section-back-to-top a {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  background: #f7fafc;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.section-back-to-top a:hover {
  background: #edf7f6;
  border-color: #b7d9d6;
  transform: translateY(-1px);
}

.contact,
.skills {
  margin-top: 1.5rem;
}
.contact h2,
.skills h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.contact p a,
.skills ul {
  font-size: 0.95rem;
  color: #333;
}
.skills ul {
  list-style: disc inside;
  margin-left: 0.5rem;
}
.skills li {
  margin-bottom: 0.25rem;
}

/* — Responsive adjustments — */
@media (max-width: 860px) {
  .home-hero {
    grid-template-columns: 1fr;
    grid-template-areas: "story" "profile";
    width: min(100%, calc(100% - 1rem));
  }

  .profile-card,
  .content-card {
    border-radius: 20px;
  }
}

@media (max-width: 600px) {
  .content-card {
    padding: 1.25rem 1rem;
  }
}

/* — Publications accordion — */
.publications-container {
  width: 100%;
  max-width: none;
  margin: 2rem 0;
  padding: 0 2rem;
}
.year-toggle {
  width: 100%;
  text-align: left;
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  padding: 0.5rem;
  background: #f4f4f4;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
}
.pub-list {
  display: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
}
.pub-list.active {
  display: block;
}

/* — Each publication entry — */
.publication {
  margin-bottom: 2rem;
}
.pub-line {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  white-space: normal;
  word-wrap: break-word;
}
.pub-line strong {
  font-weight: bold;
}
.pub-line .pub-title {
  font-weight: bold;
}

/* — DOI + Abstract links — */
.pub-links {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.pub-links a,
.pub-links button {
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #007c70;
}
.pub-links a:hover,
.pub-links button:hover {
  color: #005a50;
}

/* — Modal for TOC + abstract — */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease;
  z-index: 1000;
}
.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}
.modal {
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 1500px;
  width: 90%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.modal img {
  max-width: 30%;
  height: auto;
  margin-bottom: 1rem;
}
.modal p {
  line-height: 1.5;
}

/* — Professional Experience two‑column items — */
.resume-section {
  width: 100%;
  max-width: none;
  margin: 0rem 0;
  padding: 0 2rem;
}
.resume-section h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.resume-item {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.exp-meta {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.exp-logo {
  width: 100%;
  max-width: 100px;
  height: auto;
  object-fit: contain;
  align-self: center;
}
.exp-date {
  font-size: 1.1rem;
  font-weight: 600;
}
.exp-details {
  flex: 1;
}
.exp-institute {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.exp-group a {
  font-size: 1rem;
  text-decoration: none;
  color: #007c70;
}
.exp-group a:hover {
  text-decoration: underline;
}
.exp-position {
  font-style: italic;
  margin: 0.5rem 0;
}
.exp-description ul {
  margin-left: 1.25rem;
  list-style-type: disc;
}
.exp-description li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.section-back-to-top {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 1.5rem;
  padding: 0 2rem;
}

.section-back-to-top a {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  background: #f7fafc;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.section-back-to-top a:hover {
  background: #edf7f6;
  border-color: #b7d9d6;
  transform: translateY(-1px);
}

/* — Responsive: stack meta above details on narrow screens — */
@media (max-width: 600px) {
  .experience-item {
    flex-direction: column;
  }
  .exp-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }
  .exp-meta .exp-date,
  .exp-meta .exp-location {
    margin-right: 1rem;
  }
}

/* — LOGO NAVIGATOR — */
.logo-section {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto 5rem;
}
.logo-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.logo-nav ul {
  display: contents;
}
.logo-nav li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 108px;
  min-height: 76px;
}
.logo-nav img {
  display: block;
  width: var(--logo-width, 56px);
  max-width: 100%;
  height: auto;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  filter: grayscale(100%);
  opacity: 0.82;
}
/* Balance compact emblems and wide wordmarks by their visual weight. */
.logo-nav img[src*="fairmat.png"] { --logo-width: 76px; }
.logo-nav img[src*="hzb.png"] { --logo-width: 108px; }
.logo-nav img[src*="ksc.png"] { --logo-width: 100px; }
.logo-nav img[src*="BOEING.png"] { --logo-width: 108px; }
.logo-nav img[src*="UIUC.png"] { --logo-width: 108px; }
.logo-nav img[src*="MRS.jpg"] { --logo-width: 48px; }
.logo-nav a:hover img {
  transform: translateY(-2px) scale(1.04);
  filter: grayscale(0%);
  opacity: 1;
}

/* — Resume page (original structure, refreshed styling) — */
.body-container {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "profile story";
  gap: 1.5rem;
  width: min(1280px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
  align-items: start;
}

.profile-image,
.body-text {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.profile-image {
  grid-area: profile;
  padding: 1.5rem;
}

.profile-image img {
  width: 100%;
  max-width: 230px;
  display: block;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.2rem;
  margin-top: 0.15rem;
  text-decoration: none;
  color: #0f172a;
  font-size: 0.95rem;
  border-bottom: 1px solid #eef2f7;
  transition: color 0.15s ease, transform 0.15s ease;
}

.profile-link:hover {
  color: #0f766e;
  transform: translateX(2px);
}

.profile-icon {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px;
  padding: 0.22rem;
  border-radius: 999px;
  background: #eef2f7;
}

.body-container > .profile-image .profile-links {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.body-container > .profile-image .profile-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.7rem;
  padding: 0.55rem 0.45rem;
  margin-top: 0;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid transparent;
}

.body-container > .profile-image .profile-icon {
  justify-self: center;
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px;
}

.skills {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.skills h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  color: #0f172a;
}

.skills ul {
  list-style: disc;
  padding-left: 1.2rem;
  color: #334155;
}

.body-text {
  grid-area: story;
  padding: 1.75rem 1.9rem;
}

.body-text > .resume-section + .resume-section {
  margin-top: 2rem;
}

.body-text h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.45rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: #0f172a;
}

.resume-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
}

.resume-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.exp-date {
  font-family: 'Oswald', sans-serif;
  color: #0f766e;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.exp-logo {
  width: 100%;
  max-width: 100px;
  height: auto;
  object-fit: contain;
}

.exp-logo-imperial {
  max-width: 160px;
}

.exp-details {
  min-width: 0;
}

.resume-item > .exp-details:only-child {
  grid-column: 1 / -1;
}

.exp-institute {
  font-weight: 600;
  color: #0f172a;
}

.exp-group {
  margin-top: 0.3rem;
  color: #334155;
}

.exp-group a {
  color: #0f766e;
  text-decoration: none;
}

.exp-group a:hover {
  text-decoration: underline;
}

.exp-position {
  margin-top: 0.4rem;
  font-weight: 600;
  color: #0f172a;
}

.exp-description {
  margin-top: 0.5rem;
  color: #334155;
  line-height: 1.55;
}

.exp-description ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.exp-description li {
  margin-bottom: 0.45rem;
}

.body-text .resume-section {
  margin-top: 0;
}

.body-text .resume-section > h2 {
  margin-top: 0;
}

.resume-anchor-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 1.25rem;
  padding: 0.35rem;
  background: #f6f8fb;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

.resume-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: #475569;
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.resume-chip:hover {
  background: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
  transform: translateY(-1px);
}

.resume-subsection {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f8fafc;
}

.resume-subsection h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  color: #0f172a;
}

.resume-list {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
}

.resume-list li {
  margin-bottom: 0.45rem;
  line-height: 1.55;
  color: #334155;
}

@media (max-width: 860px) {
  .body-container {
    grid-template-columns: 1fr;
    grid-template-areas: "story" "profile";
    width: min(100%, calc(100% - 1rem));
  }

  .profile-image,
  .body-text {
    border-radius: 20px;
  }

  .resume-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .body-text {
    padding: 1.25rem 1rem;
  }

  .profile-image {
    padding: 1.25rem 1rem;
  }
}


/* Shared headings, navigation, and featured work. */
h1, .selected-work h2, .logo-section h2, .work-grid h3 {
  font-family: 'Oswald', sans-serif;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
a { color: #0f766e; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 3px solid #007c70; outline-offset: 4px; }
header a:focus-visible { outline-color: #f4b400; }
nav a[aria-current="page"] { color: #f4b400; text-decoration: underline; text-underline-offset: 0.4em; }
.skip-link { position: absolute; top: 0.5rem; left: 0.5rem; transform: translateY(-200%); z-index: 1100; padding: 0.75rem 1rem; background: #fff; color: #0f172a; }
.skip-link:focus { transform: translateY(0); }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }
.action-link { display: inline-block; padding: 0.7rem 1rem; border: 1px solid #0f766e; border-radius: 8px; font-weight: 600; text-decoration: none; }
.action-link:first-child { background: #0f766e; color: #fff; }
.selected-work { width: min(1200px, calc(100% - 2rem)); margin: 2rem auto; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.work-grid article { display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 1.4rem; }
.work-grid p, .logo-section > p { margin-bottom: 1rem; }
.work-links { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 0.5rem; }
.work-links a { display: block; font-size: 0.9rem; white-space: nowrap; }
@media (max-width: 1160px) {
  .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .work-grid article { padding: 1rem 0.75rem; }
  .work-links a { font-size: 0.75rem; }
}
.map-address { padding: 1rem; background: #fff; }
.pub-categories { margin-top: 1.25rem; }
.exp-position { font-style: normal; }
.exp-description ul { padding-left: 1.25rem; }
.resume-item { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem; }
  nav ul { justify-content: flex-start; gap: 0.5rem 1.25rem; }
  nav a { display: inline-block; padding: 0.4rem 0; letter-spacing: 0.04em; }
  .work-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
