/* Yujie Tan — Karpathy-style minimal personal site */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  background: #fff;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* Header — avatar left, text right */
.header {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 0;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.tagline {
  font-size: 1rem;
  font-style: italic;
  color: #444;
  margin: 0 0 0.75rem;
}

/* Social icons */
.social-icons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  transition: background 0.2s;
}

.social-icons a:hover {
  background: #444;
  text-decoration: none;
}

/* Links */
a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Full-width gradient divider */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd 15%, #ddd 85%, transparent);
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 2.5rem 0;
}

/* Sections */
h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: lowercase;
  margin: 0 0 1rem;
  color: #333;
}

section p {
  margin: 0 0 1rem;
}

section p:last-child {
  margin-bottom: 0;
}

/* Experience timeline */
.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 97px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: #ddd;
}

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

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-date {
  flex: 0 0 90px;
  font-weight: 500;
  margin: 0;
  padding-right: 12px;
  color: #888;
  font-size: 0.8rem;
}

.timeline-marker {
  flex: 0 0 52px;
  position: relative;
  height: 32px;
}

.timeline-dot {
  position: absolute;
  left: 4px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
}

.timeline-icon {
  position: absolute;
  left: 20px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #555;
}

.timeline-icon-img {
  position: absolute;
  left: 20px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  padding: 4px;
}

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

.timeline-content p:first-child {
  margin-top: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1.25rem;
  }

  .header {
    gap: 1.5rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .timeline-date {
    flex: 0 0 56px;
    font-size: 0.7rem;
  }

  .timeline-marker {
    flex: 0 0 32px;
  }

  .timeline::before {
    left: 61px;
  }

  .timeline-dot {
    left: 2px;
    width: 6px;
    height: 6px;
    top: 10px;
  }

  .timeline-icon {
    left: 8px;
    width: 24px;
    height: 24px;
    font-size: 0.55rem;
  }

  .timeline-icon-img {
    left: 8px;
    width: 24px;
    height: 24px;
  }
}
