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

html {
  zoom: 1.25;
}

/* === Base === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #454545;
  background-color: #ffffff;
}

a {
  color: #267CB9;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: #222;
}

h1 { font-size: 1.4rem; margin-bottom: 0.3rem; }
h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
h3 { font-size: 1rem; margin-bottom: 0.6rem; margin-top: 1.2rem; }

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 1.2rem 0;
}

/* === Layout === */
.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* Top nav */
.top-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

.top-nav a {
  color: #888;
}

.top-nav a:hover,
.top-nav a.active {
  color: #333;
}

/* Two-column layout */
.two-col {
  display: flex;
  gap: 3rem;
}

/* Sidebar */
.sidebar {
  width: 200px;
  flex-shrink: 0;
}

.sidebar .profile-photo {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.sidebar .name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.5rem;
}

.sidebar .contact-item {
  font-size: 0.8rem;
  color: #727272;
  margin-bottom: 0.25rem;
}

.sidebar .external-links {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e0e0e0;
}

.sidebar .external-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #267CB9;
  margin-bottom: 0.3rem;
}

.sidebar .external-links a:hover {
  text-decoration: underline;
}

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

.main-content p {
  margin-bottom: 0.8em !important;
  line-height: 1.5;
}

/* === Content Styles === */

/* Experience timeline */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.timeline-entry {
  position: relative;
  margin-bottom: 1.3rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.timeline-dot {
  position: absolute;
  left: -19px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  border: 2px solid #fff;
}

.timeline-logo {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-role {
  font-weight: 700;
  font-size: 0.83rem;
  color: #222;
}

.timeline-degree {
  font-size: 0.79rem;
  color: #454545;
  margin-top: 0.05rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: #727272;
  margin-top: 0.05rem;
}

.timeline-bullets {
  margin-top: 0.3rem;
  padding-left: 1.2rem;
  font-size: 0.79rem;
  color: #454545;
}

.timeline-bullets li {
  margin-bottom: 0.15rem;
}

/* Honors */
.honor-entry {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.honor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  margin-right: 0.6rem;
  position: relative;
  top: -1px;
}

.honor-entry .honor-title {
  flex: 1;
}

.honor-entry .honor-year {
  flex-shrink: 0;
  color: #727272;
  margin-left: 1rem;
}

/* Talks */
.talk-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.talk-item .venue {
  flex-shrink: 0;
  margin-left: 1rem;
  font-weight: 700;
  color: #222;
}

/* Publications */
.pub-entry {
  margin-bottom: 0;
  margin-left: -0.8rem;
  margin-right: -0.8rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.pub-entry:hover {
  background: #f0f5ff;
  border-color: #d6e4ff;
}

.pub-entry .pub-title {
  font-weight: 700;
  color: #454545;
  font-size: 0.88rem;
}

.pub-entry .pub-title a {
  color: #454545;
  text-decoration: none;
}

.pub-entry:hover .pub-title a {
  color: #1E40AF;
  text-decoration: underline;
}

.pub-entry .pub-authors {
  margin-top: 0.05rem;
  font-size: 0.79rem;
}

.pub-entry .pub-venue {
  margin-top: 0.05rem;
  font-size: 0.79rem;
  font-weight: 700;
  color: #1E40AF;
}

.pub-entry .pub-note {
  margin-top: 0.15rem;
  font-size: 0.79rem;
  font-weight: 700;
  color: #B42318;
}

.pub-entry .pub-note a {
  color: #B42318;
  text-decoration: underline;
}

/* Projects */
.project-entry {
  margin-bottom: 0.8rem;
}

.project-entry .project-title {
  font-weight: 700;
  font-size: 0.83rem;
  color: #222;
}

.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1E40AF;
  background: #f0f5ff;
  border: 1px solid #d6e4ff;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-right: 0.3rem;
  vertical-align: baseline;
}

.project-bullets {
  margin-top: 0.2rem;
  padding-left: 1.2rem;
  font-size: 0.79rem;
  color: #454545;
}

.project-bullets li {
  margin-bottom: 0.1rem;
}

/* Blog listing */
.blog-entry {
  margin-bottom: 0.8rem;
}

.blog-entry .blog-date {
  font-size: 0.8rem;
  color: #727272;
  display: inline-block;
  width: 6.5rem;
}

/* Blog post */
.post-meta {
  font-size: 0.85rem;
  color: #727272;
  margin-bottom: 0.5rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.post-content blockquote {
  border-left: 3px solid #e0e0e0;
  padding-left: 1rem;
  color: #727272;
  margin-bottom: 1rem;
}

.post-content pre {
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  padding: 0.8rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.post-content code {
  font-family: Menlo, Monaco, "Courier New", monospace;
  font-size: 0.9em;
}

.post-content p code {
  background: #f8f8f8;
  padding: 0.15em 0.35em;
  border-radius: 3px;
  border: 1px solid #e5e5e5;
}

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

/* Footer */
.site-footer {
  border-top: 1px solid #e0e0e0;
  margin-top: 2rem;
  padding: 0.8rem 0 1.5rem;
  font-size: 0.75rem;
  color: #999;
}

/* === Responsive === */
@media (max-width: 768px) {
  html {
    zoom: 1;
  }

  .top-nav {
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
  }

  .two-col {
    flex-direction: column;
    gap: 1.5rem;
  }

  .sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }

  .sidebar .profile-photo {
    width: 80px;
    height: 80px;
  }

  .sidebar .sidebar-text {
    flex: 1;
  }

  .sidebar .external-links {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    margin-top: 0;
  }

  .sidebar .external-links a {
    display: inline;
  }

  .wrapper {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .blog-entry .blog-date {
    display: block;
    margin-bottom: 0.1rem;
  }
}
