:root {
  --ink: #0b0b0b;
  --muted: #666662;
  --paper: #efefeb;
  --white: #ffffff;
  --black: #0b0b0b;
  --line: rgba(11, 11, 11, 0.2);
  --link: #0b0b0b;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--black);
  color: var(--white);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

h2 {
  margin-bottom: 30px;
  font-size: 27px;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

h4 {
  margin-bottom: 8px;
  font-size: 14px;
}

p {
  max-width: 880px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  width: min(100% - 40px, 1040px);
  margin: 24px auto 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-nav {
  display: flex;
  min-height: 58px;
  align-items: stretch;
  justify-content: space-between;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.nav-name {
  display: flex;
  padding: 0 22px;
  align-items: center;
  background: var(--black);
  color: var(--white) !important;
  font-size: 16px;
  font-weight: bold;
}

.nav-name::after {
  margin-left: 11px;
  color: var(--white);
  content: "●";
  font-size: 7px;
}

.nav-tabs {
  display: flex;
}

.tab {
  display: flex;
  min-width: 118px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
  font-size: 12px;
  font-weight: bold;
  transition: box-shadow 180ms ease, filter 180ms ease;
}

.tab-about {
  background: var(--white);
}

.tab-experience {
  background: var(--black);
}

.tab-education {
  background: var(--white);
}

.tab-projects {
  background: var(--black);
}

.site-nav .tab-experience,
.site-nav .tab-projects {
  color: var(--white);
}

.tab:hover,
.tab:focus-visible {
  filter: brightness(0.94);
  box-shadow: inset 0 -4px 0 currentColor;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page {
  width: min(100% - 40px, 1040px);
  margin: 0 auto 24px;
}

.panel {
  position: relative;
  padding: clamp(32px, 5vw, 58px);
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  scroll-margin-top: 58px;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel::after {
  position: absolute;
  z-index: 0;
  top: 18px;
  right: 30px;
  color: var(--black);
  content: "";
  font-size: clamp(90px, 12vw, 160px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.8;
  opacity: 0.035;
  pointer-events: none;
}

.intro {
  background: var(--white);
}

.intro::after {
  content: "01";
}

.experience {
  background: var(--black);
  color: var(--white);
}

.experience::after {
  color: var(--white);
  content: "02";
  opacity: 0.07;
}

.education {
  background: var(--white);
}

.education::after {
  content: "03";
}

.projects {
  background: var(--black);
  color: var(--white);
}

.projects::after {
  color: var(--white);
  content: "04";
  opacity: 0.07;
}

.experience article + article,
.projects article + article {
  border-color: rgba(255, 255, 255, 0.25);
}

.experience .role-heading p,
.experience .subheading {
  color: #b8b8b2;
}

.overline {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 700;
}

.links {
  margin-top: 26px;
  margin-bottom: 0;
}

.links span {
  margin: 0 6px;
  color: var(--muted);
}

.links a {
  font-size: 17px;
  font-weight: 800;
  text-decoration-thickness: 2px;
  transition: letter-spacing 180ms ease;
}

.links a:hover,
.links a:focus-visible {
  letter-spacing: 0.025em;
}

article + article {
  margin-top: 40px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.panel article {
  transition: transform 180ms ease;
}

.panel article:hover {
  transform: translateX(5px);
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 20px;
}

.panel h2::after {
  height: 2px;
  background: currentColor;
  content: "";
  flex: 1;
  opacity: 0.22;
}

.role-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.role-heading h3,
.role-heading p {
  margin-bottom: 6px;
}

.role-heading h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

.role-heading p {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.subheading {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

ul {
  margin: 0;
  padding-left: 19px;
}

li + li {
  margin-top: 8px;
}

.course-title {
  margin-top: 42px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

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

.projects article p:last-child {
  margin-bottom: 0;
}

footer {
  display: flex;
  padding: 24px 4px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 650px) {
  body {
    font-size: 14px;
  }

  .site-header,
  .page {
    width: 100%;
    margin: 0;
  }

  .site-header {
    position: static;
  }

  .site-nav {
    display: block;
  }

  .nav-name {
    min-height: 54px;
  }

  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .tab {
    min-width: 0;
    min-height: 46px;
    padding: 0 5px;
    border-top: 1px solid var(--line);
    font-size: 10px;
  }

  .tab:first-child {
    border-left: 0;
  }

  .panel {
    padding: 34px 22px 40px;
    scroll-margin-top: 0;
  }

  .panel::after {
    display: none;
  }

  .role-heading {
    display: block;
  }

  .role-heading p {
    white-space: normal;
  }

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

  footer {
    padding: 22px;
    background: var(--paper);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tab,
  .links a,
  .panel article {
    transition: none;
  }
}
