/* ============================================
   Dong Yang — personal site
   Typography hierarchy (Inter):
     h1  masthead name           2rem      weight 600
     h2  section heading         1.375rem  weight 600  + hairline rule
     h3  section-label           0.75rem   uppercase tracked, weight 500
     h4  entry title             1rem      weight 500
     body / description          0.9375rem weight 400
     date / location / tag       0.8125rem weight 400  grey
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #171717;
  background: #fafafa;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "cv11";
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 5.5rem 1.75rem 6rem;
}

/* ---------- Links ---------- */

a {
  color: #171717;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}

a:hover {
  border-bottom-color: #171717;
}

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  margin-bottom: 5rem;
}

.masthead-text {
  flex: 1;
  min-width: 0;
}

.masthead-portrait {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

.masthead h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #171717;
}

.masthead .tagline {
  margin: 0 0 0.6rem;
  font-size: 0.875rem;
  color: #525252;
}

.masthead .tagline em {
  font-style: normal;
}

.masthead-download {
  margin: 0 0 2.25rem;
  font-size: 0.8125rem;
  color: #737373;
}

.masthead-download a {
  color: #737373;
  border-bottom: 1px solid #d4d4d4;
}

.masthead-download a:hover {
  color: #171717;
  border-bottom-color: #171717;
}

.masthead nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 1.25rem;
  border-left: 1px solid #e5e5e5;
}

.masthead nav a {
  font-size: 0.875rem;
  color: #171717;
}

/* ---------- Sections ---------- */

section {
  margin-bottom: 5rem;
}

section > h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e5e5e5;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #171717;
}

/* Italic descriptive line right under a section h2 */
.section-intro {
  color: #525252;
  font-size: 0.875rem;
  margin: -0.75rem 0 2rem;
}

/* Small-caps labels for internal groups (Education, Experience, Skills…) */
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #737373;
  margin: 2.75rem 0 1.25rem;
  line-height: 1;
}

section > h2 + .section-label,
.section-intro + .section-label {
  margin-top: 0.25rem;
}

/* ---------- Default paragraph inside a section (e.g. Skills) ---------- */

section > p {
  margin: 0.35rem 0;
  font-size: 0.875rem;
  color: #404040;
  line-height: 1.6;
}

/* ---------- Resume entries ---------- */

.entry {
  margin: 0 0 1.75rem;
}

.entry:last-of-type {
  margin-bottom: 0;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.entry-head-left {
  flex: 1;
  min-width: 0;
}

.entry-head h4 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  color: #171717;
  letter-spacing: -0.005em;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.entry-meta .date {
  font-size: 0.8125rem;
  color: #404040;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  font-weight: 500;
}

.entry-meta .location {
  font-size: 0.8125rem;
  color: #a3a3a3;
  line-height: 1.3;
  white-space: nowrap;
}

.entry .subtitle,
.entry .role {
  color: #404040;
  font-size: 0.875rem;
  margin: 0.1rem 0 0;
  font-style: italic;
  line-height: 1.4;
}

.entry p.entry-subhead {
  font-style: italic;
  font-size: 0.8125rem;
  color: #737373;
  margin: 1.35rem 0 0.4rem;
  line-height: 1.4;
}

.entry p {
  margin: 0;
  font-size: 0.875rem;
  color: #525252;
  line-height: 1.55;
}

.entry p.disclosure {
  margin-top: 0.4rem;
}

.entry p.disclosure em {
  color: #737373;
  font-style: italic;
}

.entry p.disclosure a {
  white-space: nowrap;
}

.pdf-link {
  margin-top: 2.5rem;
  font-size: 0.875rem;
}

.pdf-link a {
  color: #171717;
  border-bottom: 1px solid #a3a3a3;
}

.pdf-link a:hover {
  border-bottom-color: #171717;
}

/* ---------- Lists (M&A / Research / Writing) ---------- */

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.list li:last-child {
  margin-bottom: 0;
}

.list .item-title {
  font-size: 1rem;
  font-weight: 500;
  color: #171717;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.list .date {
  font-size: 0.8125rem;
  color: #737373;
  margin-left: 0.6rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.list .pdf-tag {
  font-size: 0.75rem;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 0.35rem;
  border-bottom: 1px solid transparent;
}

.list .pdf-tag:hover {
  border-bottom-color: #737373;
}

.list .note {
  color: #525252;
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

/* ---------- Contact ---------- */

#contact p {
  margin: 0.35rem 0;
  color: #171717;
  font-size: 0.875rem;
}

#contact p em {
  color: #737373;
  font-style: italic;
}

/* ---------- Footer ---------- */

footer {
  margin-top: 5.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.8125rem;
  color: #a3a3a3;
}

footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  main {
    padding: 3.5rem 1.25rem 4rem;
  }

  .masthead {
    gap: 1.25rem;
    margin-bottom: 3.5rem;
  }

  .masthead-portrait {
    width: 80px;
    height: 100px;
  }

  .list .date {
    margin-left: 0;
  }

  .nowrap-mobile {
    white-space: nowrap;
  }

  .masthead h1 {
    font-size: 1.75rem;
  }

  .masthead .tagline {
    margin-bottom: 2rem;
  }

  section {
    margin-bottom: 3.5rem;
  }

  section > h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .entry-head {
    flex-direction: column;
    gap: 0.2rem;
  }

  .entry-meta {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
  }

  .entry-meta .location::before {
    content: "·";
    margin-right: 0.5rem;
    color: #a3a3a3;
  }

  .section-label {
    margin-top: 2rem;
  }
}
