/* Resume — warm cream / dark forest green */

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

:root {
  --cream: #faf6ec;
  --forest: #1f2e1a;
  --forest-soft: #55614b;
  --rule: rgba(31, 46, 26, 0.14);

  --font-sans: 'DM Sans', sans-serif;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--cream);
  color: var(--forest);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 96px 24px 80px;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

a:hover {
  text-decoration-color: var(--forest);
}

/* Header — two-column: portrait | text */
.masthead {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 24px;
  align-items: start;
  margin-bottom: 72px;
}

.portrait {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.masthead > :not(.portrait) {
  grid-column: 2;
}

.name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 2px;
}

.subtitle {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--forest-soft);
  margin-top: -2px;
  margin-bottom: 16px;
}

.tagline {
  font-size: 16px;
  color: var(--forest-soft);
  max-width: 52ch;
  margin-bottom: 20px;
}

.contact {
  font-family: var(--font-sans);
  font-size: 13px;
}

.contact .dot {
  color: var(--forest-soft);
  margin: 0 8px;
}

/* Sections — two-column grid: label | entries */
.section {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding-top: 40px;
  margin-bottom: 48px;
  border-top: 1px solid var(--rule);
}

.label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--forest-soft);
  line-height: 1.6;
}

/* Entries */
.entry {
  margin-bottom: 32px;
}

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

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.role {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.when {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--forest-soft);
  white-space: nowrap;
}

.org {
  font-size: 15px;
  color: var(--forest-soft);
  margin-top: 2px;
}

.desc {
  margin-top: 8px;
  font-size: 15px;
  max-width: 58ch;
}

/* A paragraph that opens an entry (no role heading above it) starts flush,
   so the first line of every section aligns with its label */
.entry > .desc:first-child {
  margin-top: 0;
}

.book-link {
  font-family: var(--font-sans);
  font-size: 13px;
  margin-top: 12px;
}

.book-link a {
  text-decoration-color: var(--forest-soft);
}

/* Skills — three-column grid inside the entries column */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  font-size: 14px;
  color: var(--forest-soft);
  padding: 3px 0;
}

/* Footer */
.footer {
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--forest-soft);
}

/* Tablet & below — collapse to single column */
@media (max-width: 700px) {
  .page {
    padding: 56px 20px;
  }

  .masthead {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 48px;
  }

  .portrait,
  .masthead > :not(.portrait) {
    grid-column: 1;
    grid-row: auto;
  }

  .portrait {
    margin-bottom: 20px;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 32px;
    margin-bottom: 40px;
  }

  .name {
    font-size: 21px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .entry-head {
    flex-direction: column;
    gap: 2px;
  }
}

/* Middle width — skills wrap to two columns */
@media (min-width: 701px) and (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .page {
    padding: 0;
  }

  .portrait {
    display: none;
  }

  a {
    text-decoration: none;
  }
}
