/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  background: #f5f5f3;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.site-wrapper {
  display: flex;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  gap: 3.5rem;
}

/* Sidebar */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 2.5rem;
  align-self: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.sidebar-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 35% 60%;
  transform: scale(1.10);
  display: block;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-name {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #1a1a2e;
  text-align: center;
}

.sidebar-title {
  font-size: 0.82rem;
  color: #4a4a68;
  line-height: 1.5;
  margin-bottom: 0.1rem;
  text-align: center;
  letter-spacing: 0.01em;
}

.sidebar-location {
  font-size: 0.8rem;
  color: #7a7a94;
  margin-bottom: 1.5rem;
  text-align: center;
}

.sidebar-divider {
  height: 1px;
  background: #eaeaf0;
  margin-bottom: 1.25rem;
}

.sidebar-links {
  list-style: none;
  font-size: 0.85rem;
}

.sidebar-links li {
  margin-bottom: 0.5rem;
}

.sidebar-links .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.sidebar-links a,
.sidebar-links .email-copy {
  color: #1e3a5f;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.sidebar-links a:hover,
.sidebar-links .email-copy:hover {
  color: #2a5a8f;
}

.sidebar-links a:hover .icon,
.sidebar-links .email-copy:hover .icon {
  opacity: 1;
}

/* Email Copy Button */
.email-copy {
  position: relative;
  cursor: pointer;
  color: #1e3a5f;
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.85rem;
  padding: 0;
}

.email-copy:hover {
  color: #2a5a8f;
}

.email-copy-tooltip {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: #1e3a5f;
  background: #e8f0fa;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}

.email-copy-tooltip.show {
  opacity: 1;
}

/* Navigation */
.nav {
  margin-bottom: 2.25rem;
  padding-bottom: 0;
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e0e0e4;
}

.nav a {
  font-size: 0.9rem;
  color: #4a4a68;
  text-decoration: none;
  padding: 0.5rem 1.25rem 0.65rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
  font-weight: 500;
}

.nav a:hover {
  color: #1a1a2e;
}

.nav a.active {
  color: #1e3a5f;
  border-bottom-color: #1e3a5f;
  font-weight: 600;
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 760px;
  min-width: 0;
}

.page-title {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  color: #1a1a2e;
}

/* Homepage Bio */
.bio p {
  margin-bottom: 1.1rem;
  color: #2a2a42;
  font-size: 0.95rem;
  line-height: 1.78;
}

.bio p:last-child {
  margin-bottom: 0;
}

/* Research Page */
.project {
  margin-bottom: 1.75rem;
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s, transform 0.25s;
}

.project:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.project-title {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.project-status {
  font-size: 0.78rem;
  font-style: normal;
  color: #7a7a94;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.project-abstract {
  color: #2a2a42;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.72;
}

.project-meta {
  font-size: 0.8rem;
  font-style: italic;
  color: #6a6a84;
  margin-bottom: 1.15rem;
  line-height: 1.6;
}

.project-links {
  display: flex;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.project-links a {
  color: #1e3a5f;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: #f0f4f8;
  border: 1px solid #d8dfe8;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.project-links .icon {
  width: 12px;
  height: 12px;
  opacity: 0.75;
}

.project-links a:hover {
  background: #e4ecf4;
  border-color: #b8c8d8;
  box-shadow: 0 1px 3px rgba(30, 58, 95, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
  .site-wrapper {
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .sidebar-photo {
    margin: 0 auto 1.25rem auto;
  }

  .main-content {
    max-width: 100%;
  }

  .nav {
    overflow-x: auto;
  }

  .nav a {
    padding: 0.5rem 1rem 0.65rem;
    white-space: nowrap;
  }

  .project {
    padding: 1.25rem;
  }
}
