* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  color: #2b2b2b;
  text-align: justify;
  letter-spacing: 0.08em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Top navigation bar ---------- */
.nav-bar {
  font-family: "Noto Sans Mono", monospace;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
  perspective: 1000px;
}

.nav-bar__name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-bar__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-bar__right > a {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  padding: 0.25rem 0;
  transition: opacity 0.2s;
}

.nav-bar__right > a.nav-bar__text-link {
  display: inline-block;
}

.nav-bar__right > a:hover {
  opacity: 0.6;
}

.nav-bar__right > a.active {
  color: #c41230;
  opacity: 1;
}

.nav-bar__right > a.active:hover {
  opacity: 0.85;
}

.nav-bar__divider {
  color: #ccc;
  user-select: none;
}

.nav-bar__right > a svg {
  display: block;
}

/* ---------- Main content area ---------- */
.content {
  width: 80%;
  margin: 0 auto;
  padding: 3rem 0;
}

/* ---------- Intro section ---------- */
.intro {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.intro__photo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 15px;
  flex-shrink: 0;
}

.intro__text {
  font-size: 1.1rem;
  line-height: 1.6;
}

.intro__greeting {
  font-family: "Noto Sans Mono", monospace;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

/* ---------- Accent color ---------- */
.cmu-red {
  color: #c41230;
}

/* ---------- Timeline ---------- */
.timeline-section {
  margin: 1rem 0;
}

.timeline-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 150px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #2b2b2b;
  transform: translateY(-50%);
  z-index: 1;
}

.timeline-dash-cap {
  position: relative;
  z-index: 2;
  width: 60px;
  height: 1px;
  flex-shrink: 0;
  border-top: 1px dashed #b2b2b2;
  background: #fff;
}

.timeline-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border: 1.5px solid #2b2b2b;
}

.timeline-content {
  position: absolute;
  text-align: center;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #c41230;
}

.timeline-node.top .timeline-content {
  bottom: 22px;
}

.timeline-node.bottom .timeline-content {
  top: 22px;
}

.timeline-date {
  display: block;
  font-weight: 700;
  color: #b2b2b2;
  margin-bottom: 2px;
}

/* ---------- Section heading ---------- */
.section-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
  scroll-margin-top: 5rem;
}

/* ---------- Projects grid: two per row ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.proj-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  position: relative;
  padding: 0.75rem;
  border-radius: 15px;
  cursor: pointer;
}

/* ---------- Animated border (SVG path trace) ---------- */
.proj-card__border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.proj-card__border path {
  fill: none;
  stroke: #2b2b2b;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: -1;
}

.proj-card:hover .proj-card__border path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.4s linear;
}

.proj-card__img {
  width: 240px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 15px;
  flex-shrink: 0;
}

.proj-card__body {
  flex: 1;
}

.proj-card__title {
  font-family: "Noto Sans Mono", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 0.3rem;
  text-align: left;
}

.proj-card__body p {
  font-size: 1.0rem;
  line-height: 1.5;
}

/* ---------- Responsive: collapse to single column ---------- */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}