/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --ink: #0a0a0a;
  --blue: #0066cc;
  --body: #2e2e2e;
  --muted: #6b6b6b;
  --off-white: #f4f4f4;
  --blue-tint: #e0f0fa;

  --font: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --font-roboto: "Roboto", "Helvetica Neue", Arial, sans-serif;

  --rule: 1px solid var(--ink);
  --rule-faint: 1px solid #d9d9d9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-body); font-weight: 600; color: var(--ink); line-height: 1.1; margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

::selection { background: var(--blue); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.section { scroll-margin-top: 88px; }

/* ---------- straight-line ribbon ---------- */
.ribbon {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}

.line { display: block; width: 100%; height: 2px; }
.line--ink { background: var(--ink); }
.line--blue { background: var(--blue); height: 3px; }

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: var(--rule);
}

.masthead__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--font);
  font-weight: 600;
  font-size: 22px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: color 0.15s ease;
}

.wordmark:hover { color: var(--blue); }

.mobile-controls {
  display: none;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mobile-contact { position: relative; }

.mobile-contact-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  color: var(--ink);
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.mobile-contact-toggle:hover,
.mobile-contact-toggle[aria-expanded="true"] { color: var(--blue); border-color: var(--blue); }

.mobile-contact-icon { width: 18px; height: 18px; }

.menu-toggle {
  display: none;
  align-items: center;
  height: 38px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--ink);
  padding: 0 14px;
  cursor: pointer;
  color: var(--ink);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.menu-toggle:hover { color: var(--blue); border-color: var(--blue); }

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 10px;
  gap: 28px;
}

.nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav__item:hover { color: var(--ink); }
.nav__item--active { color: var(--ink); }

.nav__line { width: 44px; height: 2px; background: var(--muted); transition: background 0.15s ease; }
.nav__item:hover .nav__line { background: var(--ink); }
.nav__item--active .nav__line { background: var(--blue); height: 3px; }

.nav__contact { position: relative; }

.nav__contact-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
}

.nav__contact-toggle[aria-expanded="true"] { color: var(--ink); }
.nav__contact-toggle[aria-expanded="true"] .nav__line { background: var(--blue); height: 3px; }

.nav__contact-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid var(--ink);
  padding: 14px 18px;
  white-space: nowrap;
}

.nav__contact-dropdown[hidden] { display: none; }

.nav__contact-email {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}

.nav__contact-email:hover { color: var(--blue); }

.resume-btn {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.resume-btn:hover { background: var(--blue); }

/* ---------- hero ---------- */
.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 100px 24px 90px;
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero__media { flex: 0 0 340px; }

.hero__headshot-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--off-white);
  border: 1px solid var(--ink);
}

.hero__content { flex: 1; min-width: 0; }

.hero__headline {
  font-family: var(--font);
  font-weight: 700;
  font-size: 56px;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero__headline em { font-style: normal; color: var(--blue); }

.hero__subline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 20px;
}

.hero__contact { display: inline-block; }

.stat-line {
  max-width: 58ch;
  margin: 20px 0 32px;
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- section shell ---------- */
.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 80px 24px;
  border-top: var(--rule);
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section__header h2 { font-family: var(--font); font-size: 34px; letter-spacing: -0.01em; }

.section__num {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--blue);
  letter-spacing: 0.08em;
}

.personal .section__intro { font-family: var(--font-roboto); }

.section__intro {
  max-width: 64ch;
  margin: 0 0 48px;
  color: var(--body);
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal--visible { opacity: 1; transform: translateY(0); }

/* ---------- 01 professional ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
  border-top: var(--rule-faint);
  transition: border-top-color 0.15s ease;
}

.timeline__row:first-child { border-top: var(--rule-faint); }
.timeline__row:hover { border-top-color: var(--ink); }
.timeline__row:hover .timeline__dot { background: var(--blue); }

.timeline__dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  margin-top: 7px;
  flex-shrink: 0;
  background: var(--ink);
  transition: background 0.15s ease;
}

.timeline__main { flex: 1; min-width: 0; }

.timeline__title { font-family: var(--font-roboto); font-size: 17px; font-weight: 600; line-height: 1.1; color: var(--blue); margin: 0 0 3px; }
.timeline__employer { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.timeline__desc { font-family: var(--font-roboto); font-size: 13px; max-width: 64ch; margin: 0; font-weight: 400; color: var(--body); }

.timeline__date {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}

/* ---------- 02 education ---------- */
.education { background: var(--off-white); max-width: none; }
.education > * { max-width: 1040px; margin-left: auto; margin-right: auto; }

.degree-banner {
  display: flex;
  align-items: stretch;
  background: var(--blue);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 48px;
}

.degree-banner__item {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
}

.degree-banner__divider {
  width: 1px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.35);
}

.degree-banner__name { font-family: var(--font-sans); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }

.degree-banner__detail { font-size: 13px; color: var(--blue-tint); margin: 0 0 16px; }

.degree-banner__date {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.coursework-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.coursework-use {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
  padding-top: 40px;
  border-top: var(--rule-faint);
}

.coursework-use__label-col { flex: 0 0 200px; }

.coursework-use .note-card { flex: 1; min-width: 0; }

.coursework-col__label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 16px;
}

.course-group { margin-top: 20px; }
.course-group:first-child { margin-top: 0; }

.course-group__label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

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

.course-list__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 12px 0;
  border-top: var(--rule-faint);
  font-size: 13.5px;
  color: var(--ink);
}

.course-list__row > span:first-child { min-width: 0; }

.course-list__tag {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.pill-set { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.pill {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 6px 12px;
  color: var(--ink);
  transition: background 0.12s ease, color 0.12s ease;
}

.pill:hover { background: var(--ink); color: #fff; }

.note-card {
  border: 1px solid var(--ink);
  padding: 18px;
  font-size: 13.5px;
  font-style: normal;
}

.note-card p { margin: 0; }

/* ---------- 03 projects ---------- */
.project-rows { list-style: none; margin: 0 0 48px; padding: 0; }

.project-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
  border-top: var(--rule-faint);
  transition: border-top-color 0.15s ease;
}

.project-row:first-child { border-top: var(--rule-faint); }
.project-row:hover { border-top-color: var(--ink); }
.project-row:hover .timeline__dot { background: var(--blue); }

.project-row__text { flex: 1; min-width: 0; }

.project-row__title { font-family: var(--font-roboto); font-size: 17px; font-weight: 600; line-height: 1.1; color: var(--blue); margin: 0 0 3px; }

.project-row__kicker {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.project-row__desc { font-family: var(--font-roboto); font-size: 13px; max-width: 64ch; margin: 0; font-weight: 400; color: var(--body); }

.project-row__link {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 0;
}

.skill-group { margin-top: 20px; }
.skill-group:first-child { margin-top: 0; }

.skill-group__label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.skill-pills { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-pill {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 7px 14px;
  color: var(--ink);
  transition: background 0.12s ease, color 0.12s ease;
}

.skill-pill:hover { background: var(--ink); color: #fff; }

/* ---------- 04 personal ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.photo-slot {
  aspect-ratio: 3 / 4;
  border-radius: 0;
  background: var(--off-white);
  border: 1px solid var(--ink);
  overflow: hidden;
}

.photo-slot__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- closing cta ---------- */
.cta {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 24px;
  border-top: var(--rule);
  text-align: center;
}

.cta__line { font-family: var(--font); font-size: 30px; font-weight: 700; margin-bottom: 36px; letter-spacing: -0.01em; }

.cta__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta__resume {
  width: 90vw;
  max-width: 820px;
  margin: 48px 0 0;
  margin-left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.cta__resume-frame {
  display: block;
  width: 100%;
  aspect-ratio: 8.5 / 11;
  border: 0;
}

.cta__pill {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 0;
  padding: 14px 26px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cta__pill--solid { background: var(--blue); color: #fff; }
.cta__pill--solid:hover { background: var(--ink); }
.cta__pill--outline { border: 1px solid var(--ink); color: var(--ink); }
.cta__pill--outline:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- footer ---------- */
.footer { border-top: var(--rule); }

.footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__left { display: flex; gap: 10px; align-items: center; }

.footer__right { display: flex; gap: 20px; }

.footer__right a { text-decoration: none; color: var(--ink); transition: color 0.15s ease; }
.footer__right a:hover { color: var(--blue); }

.ribbon--footer { margin-top: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .mobile-controls { display: flex; }
  .menu-toggle { display: inline-flex; }

  .mobile-contact .nav__contact-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    margin-top: 0;
    background: #fff;
    border: 1px solid var(--ink);
    padding: 14px 18px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: var(--rule);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
  }

  .nav--open { display: flex; }

  .nav__item { flex-direction: row; gap: 10px; align-items: center; }
  .nav__line { width: 32px; }

  .nav__contact { width: 100%; }
  .nav__contact-dropdown {
    position: static;
    margin-top: 10px;
    background: transparent;
    border: none;
    padding: 0;
  }

  .hero { padding: 64px 20px 56px; flex-direction: column; align-items: stretch; gap: 28px; }
  .hero__media { flex: none; max-width: 220px; margin: 0 auto; }
  .hero__headline { font-size: 38px; }

  .section { padding: 56px 20px; }
  .section__header h2 { font-size: 26px; }

  .degree-banner { flex-direction: column; }
  .degree-banner__item { padding: 22px 20px; }
  .degree-banner__divider { width: auto; height: 1px; }

  .coursework-grid { grid-template-columns: 1fr; gap: 32px; }

  .coursework-use { flex-direction: column; gap: 20px; margin-top: 32px; padding-top: 32px; }
  .coursework-use__label-col { flex: none; }

  .photo-grid { grid-template-columns: 1fr 1fr; }

  .cta__line { font-size: 25px; }

  .cta__resume { margin-top: 32px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}
